All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/4] drm/panel: Handle the "panel is missing" case properly
@ 2018-05-09 13:00 Boris Brezillon
  2018-05-09 13:00 ` [PATCH v3 1/4] drm/panel: Make of_drm_find_panel() return an ERR_PTR() instead of NULL Boris Brezillon
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Boris Brezillon @ 2018-05-09 13:00 UTC (permalink / raw)
  To: Thierry Reding, dri-devel, Eric Anholt; +Cc: David Airlie, Boris Brezillon

Hello,

This is a new attempt at fixing the "panel is missing" issue (described
in this thread [1]). I lost track of Eric's proposal, but I recently
proposed to address this problem through a new ->detect() hook in the
panel_funcs interface [2], which was rejected.

So here is a new version based on the feedback I had from Daniel,
Thierry and Rob.

The idea is to allow of_drm_find_panel() to return -ENODEV and let the
DRM driver decide what to do with that (silently ignore the missing
component and register the DRM device, or fail to register the DRM
device).

Patch 1 changes the semantic of of_drm_find_panel() so that it returns
an ERR_PTR() instead of NULL when the panel is not found. This way
we'll be able to differentiate the "panel is missing" from "panel has
not been probed yet" errors.

Patch 2 and 3 are adding new tests in of_drm_find_panel() and
drm_of_find_panel_or_bridge() to return -ENODEV when the status
property of the DT node is not set to "okay".

Patch 4 is patching the VC4 DSI encoder driver to gracefully handle the
-ENODEV case and allow the registration of the DRM device when the DSI
device is disabled.

Note that patch 6 which was modifying the panel status prop from the
I2C driver has been dropped because I'm not sure yet how to solve the
"force probe of deferred-probe devices even if no new devices have been
bound to drivers" problem. Anyway, even without this patch, the series
still makes sense to handle the case where devices are described in the
DT but marked "disabled" (either at compilation time or tweaked by the
bootloader).

Regards,

Boris

Changes in v3:
- Dropped patch 1 since it's been acked by Thierry and should be
  applied soon (either through the drm-tegra or drm-misc tree)
- Dropped patch 6 because we are still discussing who should mark
  the device "disabled" or "fail" and how we should trigger the
  re-probe of deferred-probe devices in this case

Changes in v2:
- Everything :-)

[1]https://lists.freedesktop.org/archives/dri-devel/2017-November/157688.html
[2]https://www.spinics.net/lists/dri-devel/msg174808.html

*** BLURB HERE ***

Boris Brezillon (4):
  drm/panel: Make of_drm_find_panel() return an ERR_PTR() instead of
    NULL
  drm/panel: Let of_drm_find_panel() return -ENODEV when the panel is
    disabled
  drm/of: Make drm_of_find_panel_or_bridge() fail when the device is
    disabled
  drm/vc4: Support the case where the DSI device is disabled

 drivers/gpu/drm/bridge/cdns-dsi.c                   |  2 +-
 drivers/gpu/drm/bridge/lvds-encoder.c               |  4 ++--
 drivers/gpu/drm/drm_of.c                            |  9 ++++++++-
 drivers/gpu/drm/drm_panel.c                         | 11 +++++++++--
 drivers/gpu/drm/exynos/exynos_dp.c                  |  6 ++++--
 drivers/gpu/drm/exynos/exynos_drm_dpi.c             |  4 ++--
 drivers/gpu/drm/exynos/exynos_drm_dsi.c             |  3 +++
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c           |  5 +++--
 drivers/gpu/drm/msm/disp/mdp4/mdp4_lcdc_encoder.c   |  4 ++--
 drivers/gpu/drm/msm/disp/mdp4/mdp4_lvds_connector.c |  5 ++++-
 drivers/gpu/drm/msm/dsi/dsi_host.c                  |  2 +-
 drivers/gpu/drm/rcar-du/rcar_lvds.c                 |  4 ++--
 drivers/gpu/drm/rockchip/dw-mipi-dsi.c              |  2 +-
 drivers/gpu/drm/sti/sti_dvo.c                       |  4 +++-
 drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c              |  4 ++--
 drivers/gpu/drm/tegra/dsi.c                         |  3 +++
 drivers/gpu/drm/tegra/output.c                      |  4 ++--
 drivers/gpu/drm/vc4/vc4_dsi.c                       | 15 +++++++++++++--
 include/drm/drm_panel.h                             |  2 +-
 19 files changed, 66 insertions(+), 27 deletions(-)

-- 
2.14.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-07-11 16:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-09 13:00 [PATCH v3 0/4] drm/panel: Handle the "panel is missing" case properly Boris Brezillon
2018-05-09 13:00 ` [PATCH v3 1/4] drm/panel: Make of_drm_find_panel() return an ERR_PTR() instead of NULL Boris Brezillon
2018-05-09 13:00 ` [PATCH v3 2/4] drm/panel: Let of_drm_find_panel() return -ENODEV when the panel is disabled Boris Brezillon
2018-05-09 13:00 ` [PATCH v3 3/4] drm/of: Make drm_of_find_panel_or_bridge() fail when the device " Boris Brezillon
2018-05-09 13:00 ` [PATCH v3 4/4] drm/vc4: Support the case where the DSI " Boris Brezillon
2018-05-16  9:17   ` Eric Anholt
2018-07-10  9:19 ` [PATCH v3 0/4] drm/panel: Handle the "panel is missing" case properly Thierry Reding
2018-07-11 16:20   ` Eric Anholt

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.