[PATCH 0/1] EDID override support

Andy Whitcroft apw at canonical.com
Wed Mar 21 15:58:23 UTC 2012


We have an issue when the KMS EDID is either not valid or does not
accuratly describe the attached monitor.  This happens with broken monitors
and also with KVM devices which often lie about the attached monitor when
you request EDID and you are not being displayed.  In these situations
it would be nice to be able to take corrective action.  Before KMS took
over display initialisation the X server allowed the user to specifify
an alternative EDID which it would use instead of the one loaded from
the monitor.  The patch attempts to provide the kernel component of such
a mechanism in the KMS world.

This patch allows us to specify new EDID files which may then overwrite the
auto detected EDID in KMS.  As loading an EDID is potentially dangerous
(indeed with old monitors you might load up and EDID which causes us
to blow up the monitor) we do not allow arbitrary files to be loaded,
we limit the files to those found in the firmware directory edid/.
The load is triggered by echoing the name of a replacement edid file
into the existing edid file in /sys.  This will use the firmware loader
to load the new binary data, and then switch to it.

It is envisioned that this would be utilised by some udev support.
For example you could perhaps use system board ids to trigger automatic
loading, or perhaps the md5sum of the existing EDID where this is always
known to be wrong.  This patch is a prerequisite for this kind of support.

This fix is not yet upstream, I am going to be tackling that next.
However it is a very self contained change, and is primarily intended to be
used by userspace support which we will define such that if the interface
changes it will be hidden from the user; I do not intend to guarentee
this interface API.  I am considering this a bug fix for those broken
EDID scenarios which we used to be able to fix in X and no longer can.

Finally some history, I have taken this patch and sanitised it for
our use, particularly limiting its reach to the edid directory in the
firmware directories.  This is both for safety and also as it would allow
that directory to be shipped in a separate package from the X team in
the future.

Proposing for Precise (post Beta 2 please).

-apw

Carsten Emde (1):
  drm/edid: allow to load edid firmware

 drivers/gpu/drm/drm_crtc_helper.c |    7 ++++
 drivers/gpu/drm/drm_edid.c        |    5 +++
 drivers/gpu/drm/drm_sysfs.c       |   66 ++++++++++++++++++++++++++++++++++++-
 include/drm/drm_crtc.h            |    1 +
 4 files changed, 78 insertions(+), 1 deletions(-)

-- 
1.7.9.1





More information about the kernel-team mailing list