Skip to contentSkip to conversation

gma600: Enable HDMI support

PATCH RESEND New Alan Cox 1 participant 1 message Nov 6, 2012

Subsystems (3)
lore
Share & tools
lore

Alan Cox

author
#0 lore raw

PATCH RESEND 1/1 gma600: Enable HDMI support

From: Alan Cox <[email protected]>

There are still some mysteries left, in particular how (and in fact if) the EDID is supposed to work on the HDMI port. However the basic stuff now works and I can plug my Q550 into an HDMI display and get the expected results.

[v2: cleans up space/tab and other formatting as per Dave's
request]

---

 drivers/gpu/drm/gma500/oaktrail.h        |    6 
 drivers/gpu/drm/gma500/oaktrail_crtc.c   |    8 +
 drivers/gpu/drm/gma500/oaktrail_device.c |    2 
 drivers/gpu/drm/gma500/oaktrail_hdmi.c   |  365 +++++++++++++++++++++++++++++-
 4 files changed, 365 insertions(+), 16 deletions(-)
drivers/gpu/drm/gma500/oaktrail.h +6 -0
index f2f9f38..30adbbe 100644
@@ -249,3 +249,9 @@ extern void oaktrail_hdmi_i2c_exit(struct pci_dev *dev);
 extern void oaktrail_hdmi_save(struct drm_device *dev);
 extern void oaktrail_hdmi_restore(struct drm_device *dev);
 extern void oaktrail_hdmi_init(struct drm_device *dev, struct psb_intel_mode_device *mode_dev);
+extern int oaktrail_crtc_hdmi_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode,
+						struct drm_display_mode *adjusted_mode, int x, int y,
+						struct drm_framebuffer *old_fb);
+extern void oaktrail_crtc_hdmi_dpms(struct drm_crtc *crtc, int mode);
+
+
drivers/gpu/drm/gma500/oaktrail_crtc.c +8 -0
index cdafd2a..4ec2962 100644
@@ -168,6 +168,11 @@ static void oaktrail_crtc_dpms(struct drm_crtc *crtc, int mode)
 	const struct psb_offset *map = &dev_priv->regmap[pipe];
 	u32 temp;
 
+	if (pipe == 1) {
+		oaktrail_crtc_hdmi_dpms(crtc, mode);
+		return;
+	}
+
 	if (!gma_power_begin(dev, true))
 		return;
 
@@ -302,6 +307,9 @@ static int oaktrail_crtc_mode_set(struct drm_crtc *crtc,
 	uint64_t scalingType = DRM_MODE_SCALE_FULLSCREEN;
 	struct drm_connector *connector;
 
+	if (pipe == 1)
+		return oaktrail_crtc_hdmi_mode_set(crtc, mode, adjusted_mode, x, y, old_fb);
+
 	if (!gma_power_begin(dev, true))
 		return 0;
 
drivers/gpu/drm/gma500/oaktrail_device.c +1 -1
index 010b8207..08747fd 100644
@@ -544,7 +544,7 @@ const struct psb_ops oaktrail_chip_ops = {
 	.accel_2d = 1,
 	.pipes = 2,
 	.crtcs = 2,
-	.hdmi_mask = (1 << 0),
+	.hdmi_mask = (1 << 1),
 	.lvds_mask = (1 << 0),
 	.cursor_needs_phys = 0,
 	.sgx_offset = MRST_SGX_OFFSET,
drivers/gpu/drm/gma500/oaktrail_hdmi.c +350 -15

398 lines not on this page · raw message