Received: by 2002:a05:6a10:8395:0:0:0:0 with SMTP id n21csp501987pxh; Tue, 9 Nov 2021 14:17:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJx2+NeltjCUm6HNw2FQq9wBH6zQocuEpzaQlaeyt7c3kW9E6Zh/xjJJqouhx/yyEVGpo5MZ X-Received: by 2002:a17:906:af1a:: with SMTP id lx26mr14181181ejb.44.1636496255525; Tue, 09 Nov 2021 14:17:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636496255; cv=none; d=google.com; s=arc-20160816; b=mTuR1dH+xHG91Ka8B23XHbwZljEgAwvs1gOPK0Twkg+4YsVk0S3JiUK+qlNZb4lyjI xl6CXHtZA1/7q4QEdTGXp2zKx/ItLTQElHvlMVo/MXkXLbzGnkCDe3QJOwzwGEz53m5n cJPw5C1xz2f2MdbrlFwfXzOM+8Qqi79qHlChqW+SpnUPDDf6O0HdyLNHWa+o8XeKAQon kdm6CZQylKXk16SLmRyAfmwgokTzHVhXCH9rhH0jBRf4oXrZjYUxphD2IY3glzpsgCFF JHOf6dVIh94SzsZStmxPp+9hUD2dBOSdsvUE/UWtYSO4yHWH9Ay6fRwflX6pjnUIR6ER YJKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from:cc :references:to:content-language:subject:user-agent:mime-version:date :message-id; bh=tpFRwU7JGHQ0I8vUZstiJIhHcjkzdrjJzYkmrBhVAS8=; b=y9dH5M6ELE9LR1JqI7V7scDwXREcjxqA0cyUTwmpJiEV4GS6uWy3iOnlcEshTeVX62 FKXF7LjSjcy72e3YJWfpMo6Vj+pseCsWbpXus9Iw5jh76OSz/vfFxQJ0buGJCT/LYW4x eCnzQfCBgMLJmzC8oBhNaCMuqq/WlADQ+K16nwykoPPr3JTTeebbYi9EHpuYn9wc4dgt rjl9QlTvWmcHPZ5dM+kelWtOEz/cMD+keopH7H1JZoC3nkoed5584M9WphVR7jkiQt3A cCguOvCjXaHtxHaTZczMgzeu9zjToGIqX/k1IpL5I+gYUVYILZB0paBLz/pDlUWev8y5 ey8w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n12si38238839edx.409.2021.11.09.14.17.06; Tue, 09 Nov 2021 14:17:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245720AbhKILZ0 (ORCPT + 99 others); Tue, 9 Nov 2021 06:25:26 -0500 Received: from mx3.molgen.mpg.de ([141.14.17.11]:46921 "EHLO mx1.molgen.mpg.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S245705AbhKILZZ (ORCPT ); Tue, 9 Nov 2021 06:25:25 -0500 Received: from [141.14.220.45] (g45.guest.molgen.mpg.de [141.14.220.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) (Authenticated sender: pmenzel) by mx.molgen.mpg.de (Postfix) with ESMTPSA id 050FE61EA192C; Tue, 9 Nov 2021 12:22:38 +0100 (CET) Message-ID: Date: Tue, 9 Nov 2021 12:22:37 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: [PATCH] media: aspeed: Fix incorrect resolution detected Content-Language: en-US To: Jammy Huang References: <20211109095453.12363-1-jammy_huang@aspeedtech.com> Cc: eajames@linux.ibm.com, mchehab@kernel.org, joel@jms.id.au, andrew@aj.id.au, linux-media@vger.kernel.org, openbmc@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org From: Paul Menzel In-Reply-To: <20211109095453.12363-1-jammy_huang@aspeedtech.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dear Jammy, Am 09.11.21 um 10:54 schrieb Jammy Huang: > During the process of os-installation, detected resolution's height > could be less than the correct one. Can you please elaborate? What OS? What resolution was and what resolution should have been detected? > Increase min-required-count of stable signal to fix the problem. So you do two changes in the patch? First use the bitfield access macros, and then change VE_MODE_DT_HOR_STABLE and VE_MODE_DT_VER_STABLE from 6 to 10? Is that the amount of iterations? Why 10 and not 20? How much time do four iterations add? Sorry for my ignorance, but if you could make it two patches, that’d be great. > Fixes: d2b4387f3bdf ("media: platform: Add Aspeed Video Engine driver") > Signed-off-by: Jammy Huang > --- > drivers/media/platform/aspeed-video.c | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) > > diff --git a/drivers/media/platform/aspeed-video.c b/drivers/media/platform/aspeed-video.c > index 5da52646b298..625a77ddb479 100644 > --- a/drivers/media/platform/aspeed-video.c > +++ b/drivers/media/platform/aspeed-video.c > @@ -196,6 +196,12 @@ > #define VE_INTERRUPT_VSYNC_DESC BIT(11) > > #define VE_MODE_DETECT 0x30c > +#define VE_MODE_DT_HOR_TOLER GENMASK(31, 28) > +#define VE_MODE_DT_VER_TOLER GENMASK(27, 24) > +#define VE_MODE_DT_HOR_STABLE GENMASK(23, 20) > +#define VE_MODE_DT_VER_STABLE GENMASK(19, 16) > +#define VE_MODE_DT_EDG_THROD GENMASK(15, 8) > + > #define VE_MEM_RESTRICT_START 0x310 > #define VE_MEM_RESTRICT_END 0x314 > > @@ -1199,7 +1205,12 @@ static void aspeed_video_init_regs(struct aspeed_video *video) > aspeed_video_write(video, VE_SCALING_FILTER3, 0x00200000); > > /* Set mode detection defaults */ > - aspeed_video_write(video, VE_MODE_DETECT, 0x22666500); > + aspeed_video_write(video, VE_MODE_DETECT, > + FIELD_PREP(VE_MODE_DT_HOR_TOLER, 2) | > + FIELD_PREP(VE_MODE_DT_VER_TOLER, 2) | > + FIELD_PREP(VE_MODE_DT_HOR_STABLE, 10) | > + FIELD_PREP(VE_MODE_DT_VER_STABLE, 10) | > + FIELD_PREP(VE_MODE_DT_EDG_THROD, 0x65)); > > aspeed_video_write(video, VE_BCD_CTRL, 0); > } > Kind regards, Paul