Skip to content

Commit

Permalink
gma600: Enable HDMI support
Browse files Browse the repository at this point in the history
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]

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Alan Cox authored and Dave Airlie committed Nov 7, 2012
1 parent 94baf0e commit 39ec748
Show file tree
Hide file tree
Showing 4 changed files with 365 additions and 16 deletions.
6 changes: 6 additions & 0 deletions drivers/gpu/drm/gma500/oaktrail.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);


8 changes: 8 additions & 0 deletions drivers/gpu/drm/gma500/oaktrail_crtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/gma500/oaktrail_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading

0 comments on commit 39ec748

Please sign in to comment.