Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752542AbcDOQEY (ORCPT ); Fri, 15 Apr 2016 12:04:24 -0400 Received: from eusmtp01.atmel.com ([212.144.249.243]:16797 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751126AbcDOQEX (ORCPT ); Fri, 15 Apr 2016 12:04:23 -0400 Subject: Re: [PATCH] drm: panel: simple-panel: set appropriate mode type To: Boris Brezillon , Thierry Reding , References: <1430404770-29704-1-git-send-email-boris.brezillon@free-electrons.com> <20150528162518.379f1714@bbrezillon> CC: , David Airlie , Jean-Christophe Plagniol-Villard , Alexandre Belloni From: Nicolas Ferre Organization: atmel Message-ID: <57111115.8020509@atmel.com> Date: Fri, 15 Apr 2016 18:04:37 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <20150528162518.379f1714@bbrezillon> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.161.30.18] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1927 Lines: 64 Le 28/05/2015 16:25, Boris Brezillon a ?crit : > Hi Thierry, > > Could you have a look at this patch (a.k.a. ping) ? It's been a long time and... It seems that this patch doesn't apply anymore but: Reviewed-by: Nicolas Ferre So, I'm updating it and resending right now. Bye, > On Thu, 30 Apr 2015 16:39:30 +0200 > Boris Brezillon wrote: > >> All modes exposed by simple panels should be tagged as driver defined >> modes. >> Moreover, if a panel supports only one mode, this mode is obviously the >> preferred one. >> >> Doing this also fix a problem occurring when a 'video=' parameter is passed >> on the kernel cmdline. In some cases the user provided mode is preferred >> over the simple panel ones, which might result in unpredictable behavior. >> >> Signed-off-by: Boris Brezillon >> --- >> drivers/gpu/drm/panel/panel-simple.c | 8 ++++++++ >> 1 file changed, 8 insertions(+) >> >> diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c >> index d14b904..95ae390 100644 >> --- a/drivers/gpu/drm/panel/panel-simple.c >> +++ b/drivers/gpu/drm/panel/panel-simple.c >> @@ -111,6 +111,10 @@ static int panel_simple_get_fixed_modes(struct panel_simple *panel) >> continue; >> } >> >> + mode->type |= DRM_MODE_TYPE_DRIVER; >> + if (panel->desc->num_modes == 1) >> + mode->type |= DRM_MODE_TYPE_PREFERRED; >> + >> drm_display_mode_from_videomode(&vm, mode); >> >> drm_mode_probed_add(connector, mode); >> @@ -127,6 +131,10 @@ static int panel_simple_get_fixed_modes(struct panel_simple *panel) >> continue; >> } >> >> + mode->type |= DRM_MODE_TYPE_DRIVER; >> + if (panel->desc->num_modes == 1) >> + mode->type |= DRM_MODE_TYPE_PREFERRED; >> + >> drm_mode_set_name(mode); >> >> drm_mode_probed_add(connector, mode); > > > -- Nicolas Ferre