aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorCarsten Emde <C.Emde@osadl.org>2012-03-18 17:37:33 -0400
committerDave Airlie <airlied@redhat.com>2012-03-20 06:09:28 -0400
commitda0df92b57311aa1b26a2a90599ed16e1e968b90 (patch)
tree428ccd98d8c7cb3b1436a649109cdaa70b64b16c /include
parent3e148baf464e5b5690ba68f3c310b06024bb862b (diff)
drm: allow loading an EDID as firmware to override broken monitor
Broken monitors and/or broken graphic boards may send erroneous or no EDID data. This also applies to broken KVM devices that are unable to correctly forward the EDID data of the connected monitor but invent their own fantasy data. This patch allows to specify an EDID data set to be used instead of probing the monitor for it. It contains built-in data sets of frequently used screen resolutions. In addition, a particular EDID data set may be provided in the /lib/firmware directory and loaded via the firmware interface. The name is passed to the kernel as module parameter of the drm_kms_helper module either when loaded options drm_kms_helper edid_firmware=edid/1280x1024.bin or as kernel commandline parameter drm_kms_helper.edid_firmware=edid/1280x1024.bin It is also possible to restrict the usage of a specified EDID data set to a particular connector. This is done by prepending the name of the connector to the name of the EDID data set using the syntax edid_firmware=[<connector>:]<edid> such as, for example, edid_firmware=DVI-I-1:edid/1920x1080.bin in which case no other connector will be affected. The built-in data sets are Resolution Name -------------------------------- 1024x768 edid/1024x768.bin 1280x1024 edid/1280x1024.bin 1680x1050 edid/1680x1050.bin 1920x1080 edid/1920x1080.bin They are ignored, if a file with the same name is available in the /lib/firmware directory. The built-in EDID data sets are based on standard timings that may not apply to a particular monitor and even crash it. Ideally, EDID data of the connected monitor should be used. They may be obtained through the drm/cardX/cardX-<connector>/edid entry in the /sys/devices PCI directory of a correctly working graphics adapter. It is even possible to specify the name of an EDID data set on-the-fly via the /sys/module interface, e.g. echo edid/myedid.bin >/sys/module/drm_kms_helper/parameters/edid_firmware The new screen mode is considered when the related kernel function is called for the first time after the change. Such calls are made when the X server is started or when the display settings dialog is opened in an already running X server. Signed-off-by: Carsten Emde <C.Emde@osadl.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/drm/drm_crtc.h1
-rw-r--r--include/drm/drm_edid.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index 3401761d6391..e250eda4e3a8 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -1012,6 +1012,7 @@ extern int drm_add_modes_noedid(struct drm_connector *connector,
1012 int hdisplay, int vdisplay); 1012 int hdisplay, int vdisplay);
1013 1013
1014extern int drm_edid_header_is_valid(const u8 *raw_edid); 1014extern int drm_edid_header_is_valid(const u8 *raw_edid);
1015extern bool drm_edid_block_valid(u8 *raw_edid);
1015extern bool drm_edid_is_valid(struct edid *edid); 1016extern bool drm_edid_is_valid(struct edid *edid);
1016struct drm_display_mode *drm_mode_find_dmt(struct drm_device *dev, 1017struct drm_display_mode *drm_mode_find_dmt(struct drm_device *dev,
1017 int hsize, int vsize, int fresh); 1018 int hsize, int vsize, int fresh);
diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h
index 74ce91684629..bcb9a66baa8c 100644
--- a/include/drm/drm_edid.h
+++ b/include/drm/drm_edid.h
@@ -238,5 +238,6 @@ int drm_av_sync_delay(struct drm_connector *connector,
238 struct drm_display_mode *mode); 238 struct drm_display_mode *mode);
239struct drm_connector *drm_select_eld(struct drm_encoder *encoder, 239struct drm_connector *drm_select_eld(struct drm_encoder *encoder,
240 struct drm_display_mode *mode); 240 struct drm_display_mode *mode);
241int drm_load_edid_firmware(struct drm_connector *connector);
241 242
242#endif /* __DRM_EDID_H__ */ 243#endif /* __DRM_EDID_H__ */