Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp13473991ybl; Sun, 29 Dec 2019 12:46:27 -0800 (PST) X-Google-Smtp-Source: APXvYqzJKfCKEildfF1055nLVkEB7REczR3d5ophHXHT08GAZzH+8/HBBURZYczfIBLY5Zow4pry X-Received: by 2002:a05:6830:1e21:: with SMTP id t1mr51484856otr.194.1577652387044; Sun, 29 Dec 2019 12:46:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577652387; cv=none; d=google.com; s=arc-20160816; b=uOX0hP8kkfeuLyOJqJffWBIq700LiTfmNA/OfVd8UzTUpyqN+nyWT51VVgbtcuA/fO 9c4fFXNfEdA2X2DzNehe3aYQDFFBG0lymHYir0e9rsspLXv7S++qoDEEjEaN7urxsSRZ UKREI4cnRYbophP+aapHe+bqOYuto54+hzpr92+Vh+wplh0JT4XmbPS1t+euEOuWQalc 0q/wg2ISitpd6B3YDceEirdRgi4DyF1aR+f1Ziub0PjlBcCdUUvHaDoBTMAAFdqBqlTw ktVxDgZlzNREkJLjbY0eSdxu6AdtkVctxnkt2gd7tvhUGKj1qQciP1kXJtRfCV8Wh9o2 1Q7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=6nQ+2zUSMeILIHOyisJZ7tuNbpMI4mQm83PO7EQXKz4=; b=LmLrBaNV0ZJ8qyw5/fIQiXBC2tNHx3Smt1E4lGTSS2DcfGKCRmcDfveetstacbjiDX O/51laDPVszaBuTdIFoVOo1a/AJ84Z78mmqHMhtaQt4fz0rJqu4rCnbA0y0B+oG5v9wx pyClHnstOe/6n0Wn3Cz1ieveBV8XWUF+RB2qBN3QodG6ORAOhBxUuHQj2BGUaEoI6jcV sViItUSG4RA0c7DaKJoBqVPJM5GJLl80TMdIDn61ioQTt64hWF4/5gIQDtlCLhVr/zD9 WpyENFC/aYXmb5MVn5stVFFMG/9HcT2eK4Nv1SSlIgXXSrUEJYoUwpyM6hxaXedNdz/z efbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zCGdqq1a; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x20si22637355otq.222.2019.12.29.12.46.16; Sun, 29 Dec 2019 12:46:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zCGdqq1a; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731445AbfL2RsW (ORCPT + 99 others); Sun, 29 Dec 2019 12:48:22 -0500 Received: from mail.kernel.org ([198.145.29.99]:59548 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731438AbfL2RsW (ORCPT ); Sun, 29 Dec 2019 12:48:22 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 19ED0207FD; Sun, 29 Dec 2019 17:48:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577641701; bh=sWxcGHqOrDoTi7lo4W9hY8bqe4UbX9jkOhSIy8FHHjw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zCGdqq1aVai3uIz32+KJdfGsD0ZwEMY1XmpAlO9JRFDEWrc0zM0MgdXe1wDI2+gX3 /YFurp6taxH0pLQmHuO70rSMpXtPo037t2nXcRYnSV2iyzYHwpjLmvuXDbbl1ry+Kc cAtTsYRynKc1e4lxb79fmr1e+Cm97GPXnAIkh2Rg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jae Hyun Yoo , Eddie James , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.4 174/434] media: aspeed: set hsync and vsync polarities to normal before starting mode detection Date: Sun, 29 Dec 2019 18:23:47 +0100 Message-Id: <20191229172713.369062011@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229172702.393141737@linuxfoundation.org> References: <20191229172702.393141737@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jae Hyun Yoo [ Upstream commit 5b3f3c41c5c791c1c22cd91655e7ef4b2a1dff7c ] Sometimes it detects a weird resolution such as 1024x287 when the actual resolution is 1024x768. To resolve such an issue, this commit adds clearing for hsync and vsync polarity register bits at the beginning of the first mode detection. This is recommended in the datasheet. Signed-off-by: Jae Hyun Yoo Reviewed-by: Eddie James Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/platform/aspeed-video.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/platform/aspeed-video.c b/drivers/media/platform/aspeed-video.c index eb12f3793062..84e0650106f5 100644 --- a/drivers/media/platform/aspeed-video.c +++ b/drivers/media/platform/aspeed-video.c @@ -741,6 +741,8 @@ static void aspeed_video_get_resolution(struct aspeed_video *video) } set_bit(VIDEO_RES_DETECT, &video->flags); + aspeed_video_update(video, VE_CTRL, + VE_CTRL_VSYNC_POL | VE_CTRL_HSYNC_POL, 0); aspeed_video_enable_mode_detect(video); rc = wait_event_interruptible_timeout(video->wait, -- 2.20.1