Re: [PATCHv16 0/7] of: add display helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Steffen Trumtrar,

> Hi!
> 
> Finally, right in time before the end of the world on friday, v16 of the
> display helpers.

I tested this on 3.8-rc1 (next 20130103) with the imx drm driver. After adding 
the following piece of code (quick hack), this works just fine. Thanks!

diff --git a/drivers/staging/imx-drm/parallel-display.c b/drivers/staging/imx-
drm/parallel-display.c
index a8064fc..e45002a 100644
--- a/drivers/staging/imx-drm/parallel-display.c
+++ b/drivers/staging/imx-drm/parallel-display.c
@@ -57,6 +57,7 @@ static void imx_pd_connector_destroy(struct drm_connector 
*connector)
 static int imx_pd_connector_get_modes(struct drm_connector *connector)
 {
        struct imx_parallel_display *imxpd = con_to_imxpd(connector);
+       struct device_node *np = imxpd->dev->of_node;
        int num_modes = 0;
 
        if (imxpd->edid) {
@@ -72,6 +73,15 @@ static int imx_pd_connector_get_modes(struct drm_connector 
*connector)
                num_modes++;
        }
 
+       if (np) {
+               struct drm_display_mode *mode = drm_mode_create(connector->dev);
+               of_get_drm_display_mode(np, &imxpd->mode, 0);
+               drm_mode_copy(mode, &imxpd->mode);
+               mode->type |= DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED,
+               drm_mode_probed_add(connector, mode);
+               num_modes++;
+       }
+
        return num_modes;
 }

Best regards,
Marek Vasut
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux