staging: drm/imx: parallel-display fixes
Subsystems (3)
v2 cover staging: drm/imx: parallel-display fixes
Hi,
Last version of this series did not apply on 3.18-rc1 as it was based on 3.17-rc. I rebased the series and solved the conflict, there are no other changes to the series. It is now based on v3.18-rc3.
Best Regards,
Markus
Markus Pargmann (1):
imx-drm: parallel-display: Fix dpms mode handling
Philipp Zabel (2):
staging: drm/imx: parallel-display: Add 24-bit BGR support
imx-drm: parallel-display: Fix drm_panel support
.../bindings/staging/imx-drm/fsl-imx-drm.txt | 4 ++-- drivers/staging/imx-drm/parallel-display.c | 24 +++++++++++++++++++--- 2 files changed, 23 insertions(+), 5 deletions(-)
Signature · 1 line
2.1.1
PATCH v2 1/3 staging: drm/imx: parallel-display: Add 24-bit BGR support
From: Philipp Zabel <[email protected]>
Add support for the BGR24 format to the IPUv3 parallel display.
--- Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt | 4 ++-- drivers/staging/imx-drm/parallel-display.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt +2 -2
@@ -60,8 +60,8 @@ Required properties: - compatible: Should be "fsl,imx-parallel-display" Optional properties: - interface_pix_fmt: How this display is connected to the - display interface. Currently supported types: "rgb24", "rgb565", "bgr666" - and "lvds666". + display interface. Currently supported types: "rgb24", "bgr24", "rgb565", + "bgr666", and "lvds666". - edid: verbatim EDID data block describing attached display. - ddc: phandle describing the i2c bus handling the display data channel
drivers/staging/imx-drm/parallel-display.c +2 -0
@@ -230,6 +230,8 @@ static int imx_pd_bind(struct device *dev, struct device *master, void *data)else if (!strcmp (fmt,"lvds666" )) imxpd->interface_pix_fmt =v4l2_fourcc ('L' ,'V' ,'D' ,'6' ); +else if (!strcmp (fmt,"bgr24" )) + imxpd->interface_pix_fmt =V4L2_PIX_FMT_BGR24 ; } panel_node =of_parse_phandle (np,"fsl,panel" ,0 );
Signature · 1 line
2.1.1
Greg Kroah-Hartman
maintainerPATCH v2 1/3 staging: drm/imx: parallel-display: Add 24-bit BGR support
Quoted 10 lines · Markus Pargmann
From: Philipp Zabel <[email protected]>
Add support for the BGR24 format to the IPUv3 parallel display.
Signed-off-by Philipp Zabel <[email protected]>Signed-off-by Markus Pargmann <[email protected]>--- Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt | 4 ++-- drivers/staging/imx-drm/parallel-display.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-)
Please work to get this driver out of staging instead of adding new features to it :(
PATCH v2 2/3 imx-drm: parallel-display: Fix drm_panel support
In reply to Markus PargmannFrom: Philipp Zabel <[email protected]>
Call drm_panel_enable/disable in reaction to encoder_commit and encoder_disable callbacks.
--- drivers/staging/imx-drm/parallel-display.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/staging/imx-drm/parallel-display.c +8 -0
@@ -128,6 +128,10 @@ static void imx_pd_encoder_prepare(struct drm_encoder *encoder)static void imx_pd_encoder_commit (struct drm_encoder *encoder) { +struct imx_parallel_display *imxpd =enc_to_imxpd (encoder); + +drm_panel_prepare (imxpd->panel); +drm_panel_enable (imxpd->panel); } static void imx_pd_encoder_mode_set(struct drm_encoder *encoder,
@@ -138,6 +142,10 @@ static void imx_pd_encoder_mode_set(struct drm_encoder *encoder,static void imx_pd_encoder_disable (struct drm_encoder *encoder) { +struct imx_parallel_display *imxpd =enc_to_imxpd (encoder); + +drm_panel_disable (imxpd->panel); +drm_panel_unprepare (imxpd->panel); }static struct drm_connector_funcs imx_pd_connector_funcs = {
Signature · 1 line
2.1.1
PATCH v2 3/3 imx-drm: parallel-display: Fix dpms mode handling
In reply to Markus PargmannWe have to call drm_panel_prepare() and drm_panel_unprepare() when switching on or off. This patch also replaces the if statement with an switch statement to only catch ON and OFF modes.
--- drivers/staging/imx-drm/parallel-display.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-)
drivers/staging/imx-drm/parallel-display.c +11 -3
@@ -106,10 +106,18 @@ static void imx_pd_encoder_dpms(struct drm_encoder *encoder, int mode) {struct imx_parallel_display *imxpd =enc_to_imxpd (encoder); -if (mode !=DRM_MODE_DPMS_ON ) -drm_panel_disable (imxpd->panel); -else +switch (mode) { +case DRM_MODE_DPMS_ON : +drm_panel_prepare (imxpd->panel);drm_panel_enable (imxpd->panel); +break ; +case DRM_MODE_DPMS_OFF : +drm_panel_disable (imxpd->panel); +drm_panel_unprepare (imxpd->panel); +break ; +default : +break ; + } } static bool imx_pd_encoder_mode_fixup(struct drm_encoder *encoder,
Signature · 1 line
2.1.1
PATCH v2 3/3 imx-drm: parallel-display: Fix dpms mode handling
Am Montag, den 03.11.2014, 15:54 +0100 schrieb Markus Pargmann:
Quoted 3 lines
We have to call
drm_panel_prepare()anddrm_panel_unprepare()when switching on or off. This patch also replaces the if statement with an switch statement to only catch ON and OFF modes.
... which is wrong. A driver is expected to map all 4 DPMS states to something sane, so the if statement did exactly the right thing here.
Regards,
Lucas
Quoted 32 lines
Signed-off-by Markus Pargmann <[email protected]>--- drivers/staging/imx-drm/parallel-display.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-)drivers/staging/imx-drm/parallel-display.c +11
-3@@ -106,10 +106,18 @@ static void imx_pd_encoder_dpms(struct drm_encoder *encoder, int mode) {struct imx_parallel_display *imxpd =enc_to_imxpd (encoder); -if (mode !=DRM_MODE_DPMS_ON ) -drm_panel_disable (imxpd->panel); -else +switch (mode) { +case DRM_MODE_DPMS_ON : +drm_panel_prepare (imxpd->panel);drm_panel_enable (imxpd->panel); +break ; +case DRM_MODE_DPMS_OFF : +drm_panel_disable (imxpd->panel); +drm_panel_unprepare (imxpd->panel); +break ; +default : +break ; + } } static bool imx_pd_encoder_mode_fixup(struct drm_encoder *encoder,
Signature · 2 lines
Pengutronix e.K. | Lucas Stach | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH v2 3/3 imx-drm: parallel-display: Fix dpms mode handling
Quoted 7 lines · Lucas Stach
Am Montag, den 03.11.2014, 15:54 +0100 schrieb Markus Pargmann:
Quoted 3 lines
We have to call
drm_panel_prepare()anddrm_panel_unprepare()when switching on or off. This patch also replaces the if statement with an switch statement to only catch ON and OFF modes.... which is wrong. A driver is expected to map all 4 DPMS states to something sane, so the if statement did exactly the right thing here.
Thanks for the clarification, I will rework this and send a new version.
Best regards,
Markus
Quoted 42 lines
Regards,
LucasQuoted 32 lines
Signed-off-by Markus Pargmann <[email protected]>--- drivers/staging/imx-drm/parallel-display.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-)drivers/staging/imx-drm/parallel-display.c +11
-3@@ -106,10 +106,18 @@ static void imx_pd_encoder_dpms(struct drm_encoder *encoder, int mode) {struct imx_parallel_display *imxpd =enc_to_imxpd (encoder); -if (mode !=DRM_MODE_DPMS_ON ) -drm_panel_disable (imxpd->panel); -else +switch (mode) { +case DRM_MODE_DPMS_ON : +drm_panel_prepare (imxpd->panel);drm_panel_enable (imxpd->panel); +break ; +case DRM_MODE_DPMS_OFF : +drm_panel_disable (imxpd->panel); +drm_panel_unprepare (imxpd->panel); +break ; +default : +break ; + } } static bool imx_pd_encoder_mode_fixup(struct drm_encoder *encoder,Signature · 2 lines
Pengutronix e.K. | Lucas Stach | Industrial Linux Solutions | http://www.pengutronix.de/ |
Signature · 11 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141103/8f064600/attachment.sig>