[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <73db81d0-dea9-0e8b-f6f4-942391213d31@codeaurora.org>
Date: Tue, 30 May 2017 16:05:48 +0530
From: Archit Taneja <architt@...eaurora.org>
To: Jose Abreu <Jose.Abreu@...opsys.com>, linux-kernel@...r.kernel.org
Cc: Neil Armstrong <narmstrong@...libre.com>,
dri-devel@...ts.freedesktop.org,
Daniel Vetter <daniel.vetter@...ll.ch>,
Carlos Palminha <CARLOS.PALMINHA@...opsys.com>,
Laurent Pinchart <Laurent.pinchart@...asonboard.com>
Subject: Re: [PATCH v5 06/10] drm/bridge: analogix-anx78xx: Use
bridge->mode_valid() callback
On 05/30/2017 12:58 PM, Neil Armstrong wrote:
> On 05/25/2017 04:19 PM, Jose Abreu wrote:
>> Now that we have a callback to check if bridge supports a given mode
>> we can use it in Analogix bridge so that we restrict the number of
>> probbed modes to the ones we can actually display.
>>
>> Also, there is no need to use mode_fixup() callback as mode_valid()
>> will handle the mode validation.
>>
>> NOTE: Only compile tested.
>>
>> Signed-off-by: Jose Abreu <joabreu@...opsys.com>
>> Cc: Carlos Palminha <palminha@...opsys.com>
>> Cc: Daniel Vetter <daniel.vetter@...ll.ch>
>> Cc: Archit Taneja <architt@...eaurora.org>
>> Cc: Andrzej Hajda <a.hajda@...sung.com>
>> Cc: Laurent Pinchart <Laurent.pinchart@...asonboard.com>
>> Cc: David Airlie <airlied@...ux.ie>
>> ---
>> drivers/gpu/drm/bridge/analogix-anx78xx.c | 13 ++++++-------
>> 1 file changed, 6 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/bridge/analogix-anx78xx.c b/drivers/gpu/drm/bridge/analogix-anx78xx.c
>> index a2a8236..cf69a1c 100644
>> --- a/drivers/gpu/drm/bridge/analogix-anx78xx.c
>> +++ b/drivers/gpu/drm/bridge/analogix-anx78xx.c
>> @@ -1061,18 +1061,17 @@ static int anx78xx_bridge_attach(struct drm_bridge *bridge)
>> return 0;
>> }
>>
>> -static bool anx78xx_bridge_mode_fixup(struct drm_bridge *bridge,
>> - const struct drm_display_mode *mode,
>> - struct drm_display_mode *adjusted_mode)
>> +enum drm_mode_status anx78xx_bridge_mode_valid(struct drm_bridge *bridge,
>> + const struct drm_display_mode *mode)
Queued to drm-misc after adding static again^ and fixing up 80 line warning.
Thanks,
Archit
>> {
>> if (mode->flags & DRM_MODE_FLAG_INTERLACE)
>> - return false;
>> + return MODE_NO_INTERLACE;
>>
>> /* Max 1200p at 5.4 Ghz, one lane */
>> if (mode->clock > 154000)
>> - return false;
>> + return MODE_CLOCK_HIGH;
>>
>> - return true;
>> + return MODE_OK;
>> }
>>
>> static void anx78xx_bridge_disable(struct drm_bridge *bridge)
>> @@ -1129,7 +1128,7 @@ static void anx78xx_bridge_enable(struct drm_bridge *bridge)
>>
>> static const struct drm_bridge_funcs anx78xx_bridge_funcs = {
>> .attach = anx78xx_bridge_attach,
>> - .mode_fixup = anx78xx_bridge_mode_fixup,
>> + .mode_valid = anx78xx_bridge_mode_valid,
>> .disable = anx78xx_bridge_disable,
>> .mode_set = anx78xx_bridge_mode_set,
>> .enable = anx78xx_bridge_enable,
>>
>
> Reviewed-by: Neil Armstrong <narmstrong@...libre.com>
>
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
Powered by blists - more mailing lists