This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/PROCESSOR-SDK-AM437X: Kernel 4.4.y backlight patch

Part Number: PROCESSOR-SDK-AM437X


Tool/software: Linux

Dear folks

This all reflects in Poky and meta-ti at their krogoth branches.

I ve made a little patch ( attached) which fixes in the 4.4.y kernel the drm connector_type flag. This flag is set to "Unknown" when the device is used via DPI panels.

This will lead weston-1.9.0 to not detect the backlight contexts as the connector_type is 0.

weston-1.9.0/src/libbacklight.c :177

    if (connector_type <= 0)
        return NULL;

output is:

[14:22:08.950] Failed to initialize backlight
[14:22:08.951] Output Unknown-1, (connector 31, crtc 33)

So my patch maps a OMAP_DISPLAY_TYPE_DPI to DRM_MODE_CONNECTOR_LVDS

This is somehow correct for our platform as we add a lvds chip and connect our dpi display to it.

so this will fix for example this node

/sys/class/drm/card0/card0-Unknown-1/

into

/sys/class/drm/card0-LVDS-1/

I dont know if later kernels or weston src fixes this  etc  but it works for our scenrio and i just wanted to let you guys know.

Cheers rob

From 208d3724dff325bab91a998de829554fa48824f5 Mon Sep 17 00:00:00 2001
From: Robert Woerle <robert@linuxdevelopment.de>
Date: Wed, 26 Apr 2017 12:40:31 +0200
Subject: [PATCH] omap_drv.c: add connector_type detection for DPI panels set
 to DRM_MODE_CONNECTOR_LVDS

Signed-off-by: Robert Woerle <robert@linuxdevelopment.de>
---
 drivers/gpu/drm/omapdrm/omap_drv.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c
index 89e5cef..a788459 100644
--- a/drivers/gpu/drm/omapdrm/omap_drv.c
+++ b/drivers/gpu/drm/omapdrm/omap_drv.c
@@ -217,6 +217,8 @@ static int get_connector_type(struct omap_dss_device *dssdev)
         return DRM_MODE_CONNECTOR_DVID;
     case OMAP_DISPLAY_TYPE_DSI:
         return DRM_MODE_CONNECTOR_DSI;
+    case OMAP_DISPLAY_TYPE_DPI:
+        return DRM_MODE_CONNECTOR_LVDS;
     default:
         return DRM_MODE_CONNECTOR_Unknown;
     }
--
1.9.1