From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Ferre Subject: Re: [PATCH] drm: panel: simple-panel: set appropriate mode type Date: Fri, 15 Apr 2016 18:04:37 +0200 Message-ID: <57111115.8020509@atmel.com> References: <1430404770-29704-1-git-send-email-boris.brezillon@free-electrons.com> <20150528162518.379f1714@bbrezillon> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <20150528162518.379f1714@bbrezillon> Sender: linux-kernel-owner@vger.kernel.org To: Boris Brezillon , Thierry Reding , linux-kernel@vger.kernel.org Cc: dri-devel@lists.freedesktop.org, David Airlie , Jean-Christophe Plagniol-Villard , Alexandre Belloni List-Id: dri-devel@lists.freedesktop.org Le 28/05/2015 16:25, Boris Brezillon a =E9crit : > Hi Thierry, >=20 > 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: >=20 >> All modes exposed by simple panels should be tagged as driver define= d >> 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=3D' parameter = is passed >> on the kernel cmdline. In some cases the user provided mode is prefe= rred >> over the simple panel ones, which might result in unpredictable beha= vior. >> >> 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; >> } >> =20 >> + mode->type |=3D DRM_MODE_TYPE_DRIVER; >> + if (panel->desc->num_modes =3D=3D 1) >> + mode->type |=3D DRM_MODE_TYPE_PREFERRED; >> + >> drm_display_mode_from_videomode(&vm, mode); >> =20 >> drm_mode_probed_add(connector, mode); >> @@ -127,6 +131,10 @@ static int panel_simple_get_fixed_modes(struct = panel_simple *panel) >> continue; >> } >> =20 >> + mode->type |=3D DRM_MODE_TYPE_DRIVER; >> + if (panel->desc->num_modes =3D=3D 1) >> + mode->type |=3D DRM_MODE_TYPE_PREFERRED; >> + >> drm_mode_set_name(mode); >> =20 >> drm_mode_probed_add(connector, mode); >=20 >=20 >=20 --=20 Nicolas Ferre