* [PATCH] drm: panel: simple-panel: set appropriate mode type
@ 2015-04-30 14:39 ` Boris Brezillon
0 siblings, 0 replies; 14+ messages in thread
From: Boris Brezillon @ 2015-04-30 14:39 UTC (permalink / raw)
To: Thierry Reding, dri-devel
Cc: Nicolas Ferre, linux-kernel, Alexandre Belloni,
Jean-Christophe Plagniol-Villard
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>
---
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);
--
1.9.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH] drm: panel: simple-panel: set appropriate mode type
@ 2015-04-30 14:39 ` Boris Brezillon
0 siblings, 0 replies; 14+ messages in thread
From: Boris Brezillon @ 2015-04-30 14:39 UTC (permalink / raw)
To: Thierry Reding, dri-devel
Cc: David Airlie, Nicolas Ferre, Jean-Christophe Plagniol-Villard,
Alexandre Belloni, linux-kernel, Boris Brezillon
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>
---
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);
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH] drm: panel: simple-panel: set appropriate mode type
2015-04-30 14:39 ` Boris Brezillon
@ 2015-04-30 14:46 ` Nicolas Ferre
-1 siblings, 0 replies; 14+ messages in thread
From: Nicolas Ferre @ 2015-04-30 14:46 UTC (permalink / raw)
To: Boris Brezillon, Thierry Reding, dri-devel
Cc: David Airlie, Jean-Christophe Plagniol-Villard, Alexandre Belloni,
linux-kernel
Le 30/04/2015 16:39, Boris Brezillon a écrit :
> 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>
Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com>
On Atmel sama5d3xek board.
> ---
> 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
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] drm: panel: simple-panel: set appropriate mode type
@ 2015-04-30 14:46 ` Nicolas Ferre
0 siblings, 0 replies; 14+ messages in thread
From: Nicolas Ferre @ 2015-04-30 14:46 UTC (permalink / raw)
To: Boris Brezillon, Thierry Reding, dri-devel
Cc: David Airlie, Jean-Christophe Plagniol-Villard, Alexandre Belloni,
linux-kernel
Le 30/04/2015 16:39, Boris Brezillon a écrit :
> 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>
Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com>
On Atmel sama5d3xek board.
> ---
> 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
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] drm: panel: simple-panel: set appropriate mode type
2015-04-30 14:39 ` Boris Brezillon
@ 2015-05-28 14:25 ` Boris Brezillon
-1 siblings, 0 replies; 14+ messages in thread
From: Boris Brezillon @ 2015-05-28 14:25 UTC (permalink / raw)
To: Thierry Reding, linux-kernel
Cc: Nicolas Ferre, dri-devel, Alexandre Belloni,
Jean-Christophe Plagniol-Villard
Hi Thierry,
Could you have a look at this patch (a.k.a. ping) ?
Best Regards,
Boris
On Thu, 30 Apr 2015 16:39:30 +0200
Boris Brezillon <boris.brezillon@free-electrons.com> 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 <boris.brezillon@free-electrons.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 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);
--
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] drm: panel: simple-panel: set appropriate mode type
@ 2015-05-28 14:25 ` Boris Brezillon
0 siblings, 0 replies; 14+ messages in thread
From: Boris Brezillon @ 2015-05-28 14:25 UTC (permalink / raw)
To: Thierry Reding, linux-kernel
Cc: Boris Brezillon, dri-devel, David Airlie, Nicolas Ferre,
Jean-Christophe Plagniol-Villard, Alexandre Belloni
Hi Thierry,
Could you have a look at this patch (a.k.a. ping) ?
Best Regards,
Boris
On Thu, 30 Apr 2015 16:39:30 +0200
Boris Brezillon <boris.brezillon@free-electrons.com> 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 <boris.brezillon@free-electrons.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 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);
--
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] drm: panel: simple-panel: set appropriate mode type
2015-05-28 14:25 ` Boris Brezillon
@ 2016-04-15 16:04 ` Nicolas Ferre
-1 siblings, 0 replies; 14+ messages in thread
From: Nicolas Ferre @ 2016-04-15 16:04 UTC (permalink / raw)
To: Boris Brezillon, Thierry Reding, linux-kernel
Cc: dri-devel, David Airlie, Jean-Christophe Plagniol-Villard,
Alexandre Belloni
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 <nicolas.ferre@atmel.com>
So, I'm updating it and resending right now.
Bye,
> On Thu, 30 Apr 2015 16:39:30 +0200
> Boris Brezillon <boris.brezillon@free-electrons.com> 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 <boris.brezillon@free-electrons.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 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
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] drm: panel: simple-panel: set appropriate mode type
@ 2016-04-15 16:04 ` Nicolas Ferre
0 siblings, 0 replies; 14+ messages in thread
From: Nicolas Ferre @ 2016-04-15 16:04 UTC (permalink / raw)
To: Boris Brezillon, Thierry Reding, linux-kernel
Cc: dri-devel, David Airlie, Jean-Christophe Plagniol-Villard,
Alexandre Belloni
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 <nicolas.ferre@atmel.com>
So, I'm updating it and resending right now.
Bye,
> On Thu, 30 Apr 2015 16:39:30 +0200
> Boris Brezillon <boris.brezillon@free-electrons.com> 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 <boris.brezillon@free-electrons.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 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
^ permalink raw reply [flat|nested] 14+ messages in thread
* [RESEND PATCH] drm/panel: simple-panel: set appropriate mode type
2015-04-30 14:39 ` Boris Brezillon
(?)
@ 2016-04-15 16:23 ` Nicolas Ferre
-1 siblings, 0 replies; 14+ 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] 14+ messages in thread
* [RESEND PATCH] drm/panel: simple-panel: set appropriate mode type
@ 2016-04-15 16:23 ` Nicolas Ferre
0 siblings, 0 replies; 14+ messages in thread
From: Nicolas Ferre @ 2016-04-15 16:23 UTC (permalink / raw)
To: Boris BREZILLON, thierry.reding, dri-devel
Cc: alexandre.belloni, linux-kernel, 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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [RESEND PATCH] drm/panel: simple-panel: set appropriate mode type
@ 2016-04-15 16:23 ` Nicolas Ferre
0 siblings, 0 replies; 14+ messages in thread
From: Nicolas Ferre @ 2016-04-15 16:23 UTC (permalink / raw)
To: Boris BREZILLON, thierry.reding, dri-devel
Cc: airlied, alexandre.belloni, linux-kernel, 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] 14+ messages in thread
* [RESEND PATCH] drm/panel: simple-panel: set appropriate mode type
2016-04-15 16:23 ` Nicolas Ferre
(?)
@ 2016-04-18 7:05 ` Thierry Reding
-1 siblings, 0 replies; 14+ 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] 14+ messages in thread
* Re: [RESEND PATCH] drm/panel: simple-panel: set appropriate mode type
@ 2016-04-18 7:05 ` Thierry Reding
0 siblings, 0 replies; 14+ messages in thread
From: Thierry Reding @ 2016-04-18 7:05 UTC (permalink / raw)
To: Nicolas Ferre
Cc: linux-kernel, dri-devel, alexandre.belloni, linux-arm-kernel
[-- Attachment #1.1: Type: text/plain, Size: 855 bytes --]
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
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [RESEND PATCH] drm/panel: simple-panel: set appropriate mode type
@ 2016-04-18 7:05 ` Thierry Reding
0 siblings, 0 replies; 14+ messages in thread
From: Thierry Reding @ 2016-04-18 7:05 UTC (permalink / raw)
To: Nicolas Ferre
Cc: Boris BREZILLON, dri-devel, airlied, alexandre.belloni,
linux-kernel, linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 855 bytes --]
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2016-04-18 7:05 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-30 14:39 [PATCH] drm: panel: simple-panel: set appropriate mode type Boris Brezillon
2015-04-30 14:39 ` Boris Brezillon
2015-04-30 14:46 ` Nicolas Ferre
2015-04-30 14:46 ` Nicolas Ferre
2015-05-28 14:25 ` Boris Brezillon
2015-05-28 14:25 ` Boris Brezillon
2016-04-15 16:04 ` Nicolas Ferre
2016-04-15 16:04 ` Nicolas Ferre
2016-04-15 16:23 ` [RESEND PATCH] drm/panel: " Nicolas Ferre
2016-04-15 16:23 ` Nicolas Ferre
2016-04-15 16:23 ` Nicolas Ferre
2016-04-18 7:05 ` Thierry Reding
2016-04-18 7:05 ` Thierry Reding
2016-04-18 7:05 ` Thierry Reding
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.