Skip to contentSkip to conversation

drm/bridge: ti-sn65dsi86: Fix 0-day build error

PATCH In review Sean Paul 4 participants 8 messages Aug 15, 2018 – Aug 20, 2018

Subsystems (3)
lore
Share & tools
lore

Sean Paul

author
#0 lore raw

PATCH 1/1 drm/bridge: ti-sn65dsi86: Fix 0-day build error

From: Guenter Roeck <[email protected]>

0day reports:

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.o: In function

`ti_sn_bridge_remove':

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.c:629: undefined reference to

`mipi_dsi_detach'

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.c:630: undefined reference to

`mipi_dsi_device_unregister'
drivers/gpu/drm/bridge/ti-sn65dsi86.o: In function
`ti_sn_bridge_attach':

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.c:249: undefined reference to

`of_find_mipi_dsi_host_by_node'

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.c:256: undefined reference to

`mipi_dsi_device_register_full'

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.c:276: undefined reference to

`mipi_dsi_attach'
drivers/gpu/drm/bridge/ti-sn65dsi86.c:289: undefined reference to
`mipi_dsi_device_unregister'

Quite obviously the driver depends on DRM_MIPI_DSI.
We can not use "depends" since the driver configuration uses "select", so we'll have to select the missing dependency instead.

---

Originally uploaded here:
https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1176224

 drivers/gpu/drm/bridge/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/bridge/Kconfig +1 -0
index 9a455c5f24f0..9eeb8ef0b174 100644
@@ -142,6 +142,7 @@ config DRM_TI_SN65DSI86
 	select DRM_KMS_HELPER
 	select REGMAP_I2C
 	select DRM_PANEL
+	select DRM_MIPI_DSI
 	help
 	  Texas Instruments SN65DSI86 DSI to eDP Bridge driver
 
Signature · 6 lines
Sean Paul, Software Engineer, Google / Chromium OS

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 21 lines · Sean Paul

From: Guenter Roeck <[email protected]>

0day reports:

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.o: In function

`ti_sn_bridge_remove':

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.c:629: undefined reference to

`mipi_dsi_detach'

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.c:630: undefined reference to

`mipi_dsi_device_unregister'
drivers/gpu/drm/bridge/ti-sn65dsi86.o: In function
`ti_sn_bridge_attach':

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.c:249: undefined reference to

`of_find_mipi_dsi_host_by_node'

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.c:256: undefined reference to

`mipi_dsi_device_register_full'

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.c:276: undefined reference to

`mipi_dsi_attach'
drivers/gpu/drm/bridge/ti-sn65dsi86.c:289: undefined reference to
`mipi_dsi_device_unregister'

Quoted 7 lines

Quite obviously the driver depends on DRM_MIPI_DSI.
We can not use "depends" since the driver configuration uses "select", so we'll have to select the missing dependency instead.

You can't mix depends and select for the same symbol, or all hell breaks loose. So needs a depends on DRM_MIPI_DSI instead. With that changed:

Quoted 28 lines

---

Originally uploaded here:
https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1176224

 drivers/gpu/drm/bridge/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/bridge/Kconfig +1 -0
index 9a455c5f24f0..9eeb8ef0b174 100644
@@ -142,6 +142,7 @@ config DRM_TI_SN65DSI86
 	select DRM_KMS_HELPER
 	select REGMAP_I2C
 	select DRM_PANEL
+	select DRM_MIPI_DSI
 	help
 	  Texas Instruments SN65DSI86 DSI to eDP Bridge driver
 
Signature · 6 lines
Sean Paul, Software Engineer, Google / Chromium OS

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#2 lore raw
Quoted 27 lines · Daniel Vetter
Quoted 25 lines · Sean Paul

From: Guenter Roeck <[email protected]>

0day reports:

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.o: In function

`ti_sn_bridge_remove':

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.c:629: undefined reference to

`mipi_dsi_detach'

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.c:630: undefined reference to

`mipi_dsi_device_unregister'
drivers/gpu/drm/bridge/ti-sn65dsi86.o: In function
`ti_sn_bridge_attach':

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.c:249: undefined reference to

`of_find_mipi_dsi_host_by_node'

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.c:256: undefined reference to

`mipi_dsi_device_register_full'

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.c:276: undefined reference to

`mipi_dsi_attach'
drivers/gpu/drm/bridge/ti-sn65dsi86.c:289: undefined reference to
`mipi_dsi_device_unregister'

Quite obviously the driver depends on DRM_MIPI_DSI.
We can not use "depends" since the driver configuration uses "select", so we'll have to select the missing dependency instead.

Quoted 7 lines
Quoted 3 lines

You can't mix depends and select for the same symbol, or all hell breaks loose. So needs a depends on DRM_MIPI_DSI instead. With that changed:

Yes, that is why I used select, not depends, as explained. "depends" causes a circular dependency.

Guenter

Quoted 26 lines
Quoted 24 lines

---

Originally uploaded here:
https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1176224

 drivers/gpu/drm/bridge/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/bridge/Kconfig +1 -1
index 9a455c5f24f0..9eeb8ef0b174 100644
@@ -142,6 +142,7 @@ config DRM_TI_SN65DSI86
      select DRM_KMS_HELPER
      select REGMAP_I2C
      select DRM_PANEL
+     select DRM_MIPI_DSI
      help
        Texas Instruments SN65DSI86 DSI to eDP Bridge driver
 
--

Sean Paul, Software Engineer, Google / Chromium OS

Quoted 9 lines
Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw
Quoted 32 lines · Guenter Roeck
Quoted 31 lines · Daniel Vetter
Quoted 28 lines · Sean Paul

From: Guenter Roeck <[email protected]>

0day reports:

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.o: In function

`ti_sn_bridge_remove':

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.c:629: undefined reference to

`mipi_dsi_detach'

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.c:630: undefined reference to

`mipi_dsi_device_unregister'
drivers/gpu/drm/bridge/ti-sn65dsi86.o: In function
`ti_sn_bridge_attach':

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.c:249: undefined reference to

`of_find_mipi_dsi_host_by_node'

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.c:256: undefined reference to

`mipi_dsi_device_register_full'

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.c:276: undefined reference to

`mipi_dsi_attach'
drivers/gpu/drm/bridge/ti-sn65dsi86.c:289: undefined reference to
`mipi_dsi_device_unregister'

Quite obviously the driver depends on DRM_MIPI_DSI.
We can not use "depends" since the driver configuration uses "select", so we'll have to select the missing dependency instead.

Quoted 6 lines
Quoted 3 lines

You can't mix depends and select for the same symbol, or all hell breaks loose. So needs a depends on DRM_MIPI_DSI instead. With that changed:

Yes, that is why I used select, not depends, as explained. "depends" causes a circular dependency.

I missgrepped, it's already chaos, so select should be perfectly fine. Well as fine as Kconfig can be.
-Daniel

Quoted 38 lines

Guenter

Quoted 35 lines
Quoted 24 lines

---

Originally uploaded here:
https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1176224

 drivers/gpu/drm/bridge/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/bridge/Kconfig +1 -1
index 9a455c5f24f0..9eeb8ef0b174 100644
@@ -142,6 +142,7 @@ config DRM_TI_SN65DSI86
      select DRM_KMS_HELPER
      select REGMAP_I2C
      select DRM_PANEL
+     select DRM_MIPI_DSI
      help
        Texas Instruments SN65DSI86 DSI to eDP Bridge driver
 
--

Sean Paul, Software Engineer, Google / Chromium OS

Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
author
#4 lore raw
Quoted 37 lines · Daniel Vetter
Quoted 36 lines · Guenter Roeck
Quoted 34 lines · Daniel Vetter
Quoted 21 lines · Sean Paul

From: Guenter Roeck <[email protected]>

0day reports:

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.o: In function

`ti_sn_bridge_remove':

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.c:629: undefined reference to

`mipi_dsi_detach'

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.c:630: undefined reference to

`mipi_dsi_device_unregister'
drivers/gpu/drm/bridge/ti-sn65dsi86.o: In function
`ti_sn_bridge_attach':

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.c:249: undefined reference to

`of_find_mipi_dsi_host_by_node'

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.c:256: undefined reference to

`mipi_dsi_device_register_full'

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.c:276: undefined reference to

`mipi_dsi_attach'
drivers/gpu/drm/bridge/ti-sn65dsi86.c:289: undefined reference to
`mipi_dsi_device_unregister'

Quoted 7 lines

Quite obviously the driver depends on DRM_MIPI_DSI.
We can not use "depends" since the driver configuration uses "select", so we'll have to select the missing dependency instead.

You can't mix depends and select for the same symbol, or all hell breaks loose. So needs a depends on DRM_MIPI_DSI instead. With that changed:

Quoted 5 lines
Quoted 2 lines

Yes, that is why I used select, not depends, as explained. "depends" causes a circular dependency.

I missgrepped, it's already chaos, so select should be perfectly fine. Well as fine as Kconfig can be.

Thanks for circling back, I've pushed the patch to -misc-next with your R-b.

Sean

Quoted 47 lines

-Daniel

Quoted 38 lines

Guenter

Quoted 35 lines
Quoted 24 lines

---

Originally uploaded here:
https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1176224

 drivers/gpu/drm/bridge/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/bridge/Kconfig +1 -1
index 9a455c5f24f0..9eeb8ef0b174 100644
@@ -142,6 +142,7 @@ config DRM_TI_SN65DSI86
      select DRM_KMS_HELPER
      select REGMAP_I2C
      select DRM_PANEL
+     select DRM_MIPI_DSI
      help
        Texas Instruments SN65DSI86 DSI to eDP Bridge driver
 
--

Sean Paul, Software Engineer, Google / Chromium OS

Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
Signature · 5 lines
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#5 lore raw
In reply to Sean Paul
Quoted 15 lines · Sean Paul

From: Guenter Roeck <[email protected]>

0day reports:

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.o: In function

`ti_sn_bridge_remove':

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.c:629: undefined reference to

`mipi_dsi_detach'

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.c:630: undefined reference to

`mipi_dsi_device_unregister'
drivers/gpu/drm/bridge/ti-sn65dsi86.o: In function
`ti_sn_bridge_attach':

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.c:249: undefined reference to

`of_find_mipi_dsi_host_by_node'

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.c:256: undefined reference to

Quoted 8 lines

`mipi_dsi_device_register_full'

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.c:276: undefined reference to

`mipi_dsi_attach'
drivers/gpu/drm/bridge/ti-sn65dsi86.c:289: undefined reference to
`mipi_dsi_device_unregister'

Quite obviously the driver depends on DRM_MIPI_DSI.
We can not use "depends" since the driver configuration uses "select",

Why?
As mentioned in other threads: select for DSI controllers, depends on - for DSI peripherals.

Regards
Andrzej

Quoted 19 lines

so we'll have to select the missing dependency instead.

---

Originally uploaded here:
https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1176224

 drivers/gpu/drm/bridge/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/bridge/Kconfig +0 -0
index 9a455c5f24f0..9eeb8ef0b174 100644

drivers/gpu/drm/bridge/Kconfig config DRM_TI_SN65DSI86 · line 148

Quoted 7 lines
drivers/gpu/drm/bridge/Kconfig +1 -0
@@ -142,6 +142,7 @@ config DRM_TI_SN65DSI86
 	select DRM_KMS_HELPER
 	select REGMAP_I2C
 	select DRM_PANEL
+	select DRM_MIPI_DSI
 	help
 	  Texas Instruments SN65DSI86 DSI to eDP Bridge driver
 

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#6 lore raw
Quoted 19 lines · Andrzej Hajda
Quoted 17 lines · Sean Paul

From: Guenter Roeck <[email protected]>

0day reports:

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.o: In function

`ti_sn_bridge_remove':

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.c:629: undefined reference to

`mipi_dsi_detach'

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.c:630: undefined reference to

`mipi_dsi_device_unregister'
drivers/gpu/drm/bridge/ti-sn65dsi86.o: In function
`ti_sn_bridge_attach':

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.c:249: undefined reference to

`of_find_mipi_dsi_host_by_node'

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.c:256: undefined reference to

`mipi_dsi_device_register_full'

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.c:276: undefined reference to

Quoted 8 lines
Quoted 6 lines

`mipi_dsi_attach'
drivers/gpu/drm/bridge/ti-sn65dsi86.c:289: undefined reference to
`mipi_dsi_device_unregister'

Quite obviously the driver depends on DRM_MIPI_DSI.
We can not use "depends" since the driver configuration uses "select",

Why?

Because the driver otherwise uses select, as mentioned. An attempt to use "depends on" results in a circular dependency.

Quoted 2 lines

As mentioned in other threads: select for DSI controllers, depends on - for DSI peripherals.

Please feel free to find a better solution, preferrably one that does not result in a circular dependency.

Thanks,
Guenter

Quoted 18 lines

Regards
Andrzej

Quoted 14 lines

so we'll have to select the missing dependency instead.

---

Originally uploaded here:
https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1176224

 drivers/gpu/drm/bridge/Kconfig | 1 +
 1 file changed, 1 insertion(+)
Quoted 14 lines

drivers/gpu/drm/bridge/Kconfig config DRM_TI_SN65DSI86 · line 148

Quoted 12 lines
drivers/gpu/drm/bridge/Kconfig +1 -0
index 9a455c5f24f0..9eeb8ef0b174 100644
@@ -142,6 +142,7 @@ config DRM_TI_SN65DSI86
      select DRM_KMS_HELPER
      select REGMAP_I2C
      select DRM_PANEL
+     select DRM_MIPI_DSI
      help
        Texas Instruments SN65DSI86 DSI to eDP Bridge driver
 

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reviewed-by
#7 lore raw
Quoted 23 lines · Guenter Roeck
Quoted 22 lines · Andrzej Hajda
Quoted 21 lines · Sean Paul

From: Guenter Roeck <[email protected]>

0day reports:

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.o: In function

`ti_sn_bridge_remove':

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.c:629: undefined reference to

`mipi_dsi_detach'

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.c:630: undefined reference to

`mipi_dsi_device_unregister'
drivers/gpu/drm/bridge/ti-sn65dsi86.o: In function
`ti_sn_bridge_attach':

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.c:249: undefined reference to

`of_find_mipi_dsi_host_by_node'

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.c:256: undefined reference to

`mipi_dsi_device_register_full'

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/bridge/ti-sn65dsi86.c:276: undefined reference to

`mipi_dsi_attach'
drivers/gpu/drm/bridge/ti-sn65dsi86.c:289: undefined reference to
`mipi_dsi_device_unregister'

Quoted 5 lines
Quoted 3 lines
Quoted 2 lines

Quite obviously the driver depends on DRM_MIPI_DSI.
We can not use "depends" since the driver configuration uses "select",

Why?

Because the driver otherwise uses select, as mentioned. An attempt to use "depends on" results in a circular dependency.

OK, I was blind. Next time please provide error message from recursive dependency, it should give better hint what is going on. Now I understand why Sean posted the patch changing "depends on" to select :)

 --
Regards
Andrzej

Quoted 40 lines
Quoted 3 lines

As mentioned in other threads: select for DSI controllers, depends on - for DSI peripherals.

Please feel free to find a better solution, preferrably one that does not result in a circular dependency.

Thanks,
Guenter

Quoted 30 lines

Regards
Andrzej

Quoted 26 lines

so we'll have to select the missing dependency instead.

---

Originally uploaded here:
https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1176224

 drivers/gpu/drm/bridge/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/bridge/Kconfig +1 -0
index 9a455c5f24f0..9eeb8ef0b174 100644
@@ -142,6 +142,7 @@ config DRM_TI_SN65DSI86
      select DRM_KMS_HELPER
      select REGMAP_I2C
      select DRM_PANEL
+     select DRM_MIPI_DSI
      help
        Texas Instruments SN65DSI86 DSI to eDP Bridge driver
 

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel