[PATCH 00/14] drm: Try to fix encoder possible_clones/crtcs
Ville Syrjala
ville.syrjala at linux.intel.com
Fri Jun 15 16:49:11 UTC 2018
From: Ville Syrjälä <ville.syrjala at 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 at gmail.com>
Cc: Benjamin Gaignard <benjamin.gaignard at linaro.org>
Cc: Vincent Abriou <vincent.abriou at st.com>
Cc: Inki Dae <inki.dae at samsung.com>
Cc: Joonyoung Shim <jy0922.shim at samsung.com>
Cc: Seung-Woo Kim <sw0312.kim at samsung.com>
Cc: Kyungmin Park <kyungmin.park at samsung.com>
Cc: Philipp Zabel <p.zabel at 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
More information about the dri-devel
mailing list