[PATCH 00/14] drm: Try to fix encoder possible_clones/crtcs

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

 



From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>

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@xxxxxxxxx>
Cc: Benjamin Gaignard <benjamin.gaignard@xxxxxxxxxx>
Cc: Vincent Abriou <vincent.abriou@xxxxxx>
Cc: Inki Dae <inki.dae@xxxxxxxxxxx>
Cc: Joonyoung Shim <jy0922.shim@xxxxxxxxxxx>
Cc: Seung-Woo Kim <sw0312.kim@xxxxxxxxxxx>
Cc: Kyungmin Park <kyungmin.park@xxxxxxxxxxx>
Cc: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>

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@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux