public inbox for dri-devel@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 00/14] drm: Try to fix encoder possible_clones/crtcs
@ 2018-06-15 16:49 Ville Syrjala
  2018-06-15 16:49 ` [PATCH 01/14] drm: Add drm_encoder_mask() Ville Syrjala
                   ` (13 more replies)
  0 siblings, 14 replies; 26+ messages in thread
From: Ville Syrjala @ 2018-06-15 16:49 UTC (permalink / raw)
  To: dri-devel
  Cc: Joonyoung Shim, intel-gfx, Seung-Woo Kim, Inki Dae, Kyungmin Park,
	Benjamin Gaignard, Philipp Zabel, Vincent Abriou

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Apparently several drivers fill encoder->possible_clones with bogus
data, which means userspace can't trust that information at all.
Let's try to fix up some of the problems and add some sanity checks
into the core to persuade drivers to get it right from now on.
What we can't enforce is drivers actually implementing what they
advertize, so userspace would still have to take this information
with a grain of salt. But at least the information should be self
consistent.

I also figured we migth do something similar for possible_crtcs.
Although that is less important as there is no need for this to
match between two encoders. I also suspect the validation WARNs
would trip on some drivers. So we might not even want this part,
and instead we should just filter out bits for non-existing
crtcs.

Smoke tested on i915, and compile tested otherwise.

Pushed the lot here:
git://github.com/vsyrjala/linux.git possible_clones_clean

Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: Vincent Abriou <vincent.abriou@st.com>
Cc: Inki Dae <inki.dae@samsung.com>
Cc: Joonyoung Shim <jy0922.shim@samsung.com>
Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>

Ville Syrjälä (14):
  drm: Add drm_encoder_mask()
  drm: Include the encoder itself in possible_clones
  drm/gma500: Sanitize possible_clones
  drm/sti: Remove pointless casts
  drm/sti: Try to fix up the tvout possible clones
  drm/exynos: Use drm_encoder_mask()
  drm/imx: Remove the bogus possible_clones setup
  drm: Validate encoder->possible_clones
  drm/i915: Use drm_encoder_mask()
  drm/i915: Populate possible_crtcs correctly
  drm/i915: Fix DP-MST crtc_mask
  drm/i915: Clean up encoder->crtc_mask setup
  drm/i915: Simplfy LVDS crtc_mask setup
  drm: Validate encoder->possible_crtcs

 drivers/gpu/drm/drm_encoder.c           | 66 ++++++++++++++++++++++++++++++++-
 drivers/gpu/drm/exynos/exynos_drm_drv.c |  5 +--
 drivers/gpu/drm/gma500/framebuffer.c    | 16 ++++----
 drivers/gpu/drm/gma500/mdfld_dsi_dpi.c  |  4 +-
 drivers/gpu/drm/i915/intel_crt.c        |  4 +-
 drivers/gpu/drm/i915/intel_ddi.c        |  2 +-
 drivers/gpu/drm/i915/intel_display.c    | 20 ++++++++--
 drivers/gpu/drm/i915/intel_dp.c         |  6 +--
 drivers/gpu/drm/i915/intel_dp_mst.c     |  2 +-
 drivers/gpu/drm/i915/intel_dvo.c        |  2 +-
 drivers/gpu/drm/i915/intel_hdmi.c       |  6 +--
 drivers/gpu/drm/i915/intel_lvds.c       |  8 ++--
 drivers/gpu/drm/i915/intel_sdvo.c       |  2 +-
 drivers/gpu/drm/i915/intel_tv.c         |  3 +-
 drivers/gpu/drm/imx/imx-drm-core.c      |  2 +-
 drivers/gpu/drm/sti/sti_tvout.c         | 15 +++++---
 include/drm/drm_encoder.h               | 14 ++++++-
 17 files changed, 132 insertions(+), 45 deletions(-)

-- 
2.16.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2018-06-25 18:37 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-15 16:49 [PATCH 00/14] drm: Try to fix encoder possible_clones/crtcs Ville Syrjala
2018-06-15 16:49 ` [PATCH 01/14] drm: Add drm_encoder_mask() Ville Syrjala
2018-06-15 16:49 ` [PATCH 02/14] drm: Include the encoder itself in possible_clones Ville Syrjala
2018-06-15 16:49 ` [PATCH 03/14] drm/gma500: Sanitize possible_clones Ville Syrjala
2018-06-15 16:49 ` [PATCH 04/14] drm/sti: Remove pointless casts Ville Syrjala
2018-06-18  7:53   ` Benjamin Gaignard
2018-06-15 16:49 ` [PATCH 05/14] drm/sti: Try to fix up the tvout possible clones Ville Syrjala
2018-06-18  8:16   ` Benjamin Gaignard
2018-06-18 12:38   ` [PATCH v2 " Ville Syrjala
2018-06-20  9:02     ` Benjamin Gaignard
2018-06-15 16:49 ` [PATCH 06/14] drm/exynos: Use drm_encoder_mask() Ville Syrjala
2018-06-15 16:49 ` [PATCH 07/14] drm/imx: Remove the bogus possible_clones setup Ville Syrjala
2018-06-15 16:49 ` [PATCH 08/14] drm: Validate encoder->possible_clones Ville Syrjala
2018-06-15 16:49 ` [PATCH 09/14] drm/i915: Use drm_encoder_mask() Ville Syrjala
2018-06-15 16:49 ` [PATCH 10/14] drm/i915: Populate possible_crtcs correctly Ville Syrjala
2018-06-22  1:26   ` Dhinakaran Pandiyan
2018-06-25 11:10     ` Ville Syrjälä
2018-06-25 18:37       ` Dhinakaran Pandiyan
2018-06-15 16:49 ` [PATCH 11/14] drm/i915: Fix DP-MST crtc_mask Ville Syrjala
2018-06-15 18:33   ` Dhinakaran Pandiyan
2018-06-15 18:43     ` Ville Syrjälä
2018-06-22  0:36       ` [Intel-gfx] " Dhinakaran Pandiyan
2018-06-15 16:49 ` [PATCH 12/14] drm/i915: Clean up encoder->crtc_mask setup Ville Syrjala
2018-06-18 18:27   ` Jani Nikula
2018-06-15 16:49 ` [PATCH 13/14] drm/i915: Simplfy LVDS crtc_mask setup Ville Syrjala
2018-06-15 16:49 ` [PATCH 14/14] drm: Validate encoder->possible_crtcs Ville Syrjala

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox