]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge branch 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 25 Mar 2011 00:27:20 +0000 (17:27 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 25 Mar 2011 00:27:20 +0000 (17:27 -0700)
* 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm/vblank: update recently added vbl interface to be more future proof.
  drm radeon: Return -EINVAL on wrong pm sysfs access
  drm/radeon/kms: fix hardcoded EDID handling
  Revert "drm/i915: Don't save/restore hardware status page address register"
  drm/i915: Avoid unmapping pages from a NULL address space
  drm/i915: Fix use after free within tracepoint
  drm/i915: Restore missing command flush before interrupt on BLT ring
  drm/i915: Disable pagefaults along execbuffer relocation fast path
  drm/i915: Fix computation of pitch for dumb bo creator
  drm/i915: report correct render clock frequencies on SNB
  drm/i915/dp: Correct the order of deletion for ghost eDP devices
  drm/i915: Fix tiling corruption from pipelined fencing
  drm/i915: Re-enable self-refresh
  drm/i915: Prevent racy removal of request from client list
  drm/i915: skip redundant operations whilst enabling pipes and planes
  drm/i915: Remove surplus POSTING_READs before wait_for_vblank
  drm/radeon/kms: prefer legacy pll algo for tv-out
  drm: check for modesetting on modeset ioctls
  drm/kernel: vblank wait on crtc > 1
  drm: Fix use-after-free in drm_gem_vm_close()

1  2 
drivers/gpu/drm/radeon/radeon_connectors.c
drivers/gpu/drm/radeon/radeon_mode.h

index 28c7961cd19bc986540dd0b0413dba2f5bc94ffe,a1866738a65789ae477a6b7ec5864b05706cdabc..2ef6d513506404075307c5f5865e091b8e4653ea
@@@ -40,10 -40,6 +40,10 @@@ radeon_atombios_connected_scratch_regs(
                                       struct drm_encoder *encoder,
                                       bool connected);
  
 +extern void
 +radeon_legacy_backlight_init(struct radeon_encoder *radeon_encoder,
 +                           struct drm_connector *drm_connector);
 +
  void radeon_connector_hotplug(struct drm_connector *connector)
  {
        struct drm_device *dev = connector->dev;
@@@ -633,6 -629,8 +633,8 @@@ static int radeon_vga_mode_valid(struc
  static enum drm_connector_status
  radeon_vga_detect(struct drm_connector *connector, bool force)
  {
+       struct drm_device *dev = connector->dev;
+       struct radeon_device *rdev = dev->dev_private;
        struct radeon_connector *radeon_connector = to_radeon_connector(connector);
        struct drm_encoder *encoder;
        struct drm_encoder_helper_funcs *encoder_funcs;
  
        if (ret == connector_status_connected)
                ret = radeon_connector_analog_encoder_conflict_solve(connector, encoder, ret, true);
+       /* RN50 and some RV100 asics in servers often have a hardcoded EDID in the
+        * vbios to deal with KVMs. If we have one and are not able to detect a monitor
+        * by other means, assume the CRT is connected and use that EDID.
+        */
+       if ((!rdev->is_atom_bios) &&
+           (ret == connector_status_disconnected) &&
+           rdev->mode_info.bios_hardcoded_edid_size) {
+               ret = connector_status_connected;
+       }
        radeon_connector_update_scratch_regs(connector, ret);
        return ret;
  }
@@@ -794,6 -803,8 +807,8 @@@ static int radeon_dvi_get_modes(struct 
  static enum drm_connector_status
  radeon_dvi_detect(struct drm_connector *connector, bool force)
  {
+       struct drm_device *dev = connector->dev;
+       struct radeon_device *rdev = dev->dev_private;
        struct radeon_connector *radeon_connector = to_radeon_connector(connector);
        struct drm_encoder *encoder = NULL;
        struct drm_encoder_helper_funcs *encoder_funcs;
                         * you don't really know what's connected to which port as both are digital.
                         */
                        if (radeon_connector->shared_ddc && (ret == connector_status_connected)) {
-                               struct drm_device *dev = connector->dev;
-                               struct radeon_device *rdev = dev->dev_private;
                                struct drm_connector *list_connector;
                                struct radeon_connector *list_radeon_connector;
                                list_for_each_entry(list_connector, &dev->mode_config.connector_list, head) {
                ret = radeon_connector_analog_encoder_conflict_solve(connector, encoder, ret, true);
        }
  
+       /* RN50 and some RV100 asics in servers often have a hardcoded EDID in the
+        * vbios to deal with KVMs. If we have one and are not able to detect a monitor
+        * by other means, assume the DFP is connected and use that EDID.  In most
+        * cases the DVI port is actually a virtual KVM port connected to the service
+        * processor.
+        */
+       if ((!rdev->is_atom_bios) &&
+           (ret == connector_status_disconnected) &&
+           rdev->mode_info.bios_hardcoded_edid_size) {
+               radeon_connector->use_digital = true;
+               ret = connector_status_connected;
+       }
  out:
        /* updated in get modes as well since we need to know if it's analog or digital */
        radeon_connector_update_scratch_regs(connector, ret);
@@@ -1530,17 -1552,6 +1556,17 @@@ radeon_add_legacy_connector(struct drm_
                connector->polled = DRM_CONNECTOR_POLL_HPD;
        connector->display_info.subpixel_order = subpixel_order;
        drm_sysfs_connector_add(connector);
 +      if (connector_type == DRM_MODE_CONNECTOR_LVDS) {
 +              struct drm_encoder *drm_encoder;
 +
 +              list_for_each_entry(drm_encoder, &dev->mode_config.encoder_list, head) {
 +                      struct radeon_encoder *radeon_encoder;
 +
 +                      radeon_encoder = to_radeon_encoder(drm_encoder);
 +                      if (radeon_encoder->encoder_id == ENCODER_OBJECT_ID_INTERNAL_LVDS)
 +                              radeon_legacy_backlight_init(radeon_encoder, connector);
 +              }
 +      }
        return;
  
  failed:
index e4582814bb78d604db3184e7134690447211e3ea,1ae6846de82739523258f1fe59a44b63edf12cb5..9c57538231d5f2c9b42c1516797472e149583f04
@@@ -239,6 -239,7 +239,7 @@@ struct radeon_mode_info 
        struct drm_property *underscan_vborder_property;
        /* hardcoded DFP edid from BIOS */
        struct edid *bios_hardcoded_edid;
+       int bios_hardcoded_edid_size;
  
        /* pointer to fbdev info structure */
        struct radeon_fbdev *rfbdev;
@@@ -302,9 -303,6 +303,9 @@@ struct radeon_encoder_lvds 
        uint32_t lvds_gen_cntl;
        /* panel mode */
        struct drm_display_mode native_mode;
 +      struct backlight_device *bl_dev;
 +      int      dpms_mode;
 +      uint8_t  backlight_level;
  };
  
  struct radeon_encoder_tv_dac {
@@@ -358,9 -356,6 +359,9 @@@ struct radeon_encoder_atom_dig 
        uint32_t lcd_ss_id;
        /* panel mode */
        struct drm_display_mode native_mode;
 +      struct backlight_device *bl_dev;
 +      int dpms_mode;
 +      uint8_t backlight_level;
  };
  
  struct radeon_encoder_atom_dac {