* [RESEND PATCH] drm/panel: simple-panel: set appropriate mode type
[not found] <1430404770-29704-1-git-send-email-boris.brezillon@free-electrons.com>
@ 2016-04-15 16:23 ` Nicolas Ferre
2016-04-18 7:05 ` Thierry Reding
0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Ferre @ 2016-04-15 16:23 UTC (permalink / raw)
To: linux-arm-kernel
From: Boris Brezillon <boris.brezillon@free-electrons•com>
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 <boris.brezillon@free-electrons•com>
Reviewed-by: Nicolas Ferre <nicolas.ferre@atmel•com>
Tested-by: Nicolas Ferre <nicolas.ferre@atmel•com>
---
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 ceb20486dacf..45b924ebed57 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -115,6 +115,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_set_name(mode);
@@ -132,6 +136,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);
--
2.1.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [RESEND PATCH] drm/panel: simple-panel: set appropriate mode type
2016-04-15 16:23 ` [RESEND PATCH] drm/panel: simple-panel: set appropriate mode type Nicolas Ferre
@ 2016-04-18 7:05 ` Thierry Reding
0 siblings, 0 replies; 2+ messages in thread
From: Thierry Reding @ 2016-04-18 7:05 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Apr 15, 2016 at 06:23:33PM +0200, Nicolas Ferre wrote:
> From: Boris Brezillon <boris.brezillon@free-electrons•com>
>
> 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 <boris.brezillon@free-electrons•com>
> Reviewed-by: Nicolas Ferre <nicolas.ferre@atmel•com>
> Tested-by: Nicolas Ferre <nicolas.ferre@atmel•com>
> ---
> drivers/gpu/drm/panel/panel-simple.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
Applied, thanks.
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160418/71ce3ea8/attachment.sig>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-04-18 7:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1430404770-29704-1-git-send-email-boris.brezillon@free-electrons.com>
2016-04-15 16:23 ` [RESEND PATCH] drm/panel: simple-panel: set appropriate mode type Nicolas Ferre
2016-04-18 7:05 ` Thierry Reding
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox