Skip to content

Commit 155e36d

Browse files
committed
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes from Dave Airlie: "A bunch of scattered fixes ati/intel/nouveau, couple of core ones, nothing too shocking or different." * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: drm: Add EDID_QUIRK_FORCE_REDUCED_BLANKING for ASUS VW222S gma500: Consider CRTC initially active. drm/radeon: fix dig encoder selection on DCE61 drm/radeon: fix double free in radeon_gpu_reset drm/radeon: force dma32 to fix regression rs4xx,rs6xx,rs740 drm/radeon: rework panel mode setup drm/radeon/atom: powergating fixes for DCE6 drm/radeon/atom: rework DIG modesetting on DCE3+ drm/radeon: don't disable plls that are in use by other crtcs drm/radeon: add proper checking of RESOLVE_BOX command for r600-r700 drm/radeon: initialize tracked CS state drm/radeon: fix reading CB_COLORn_MASK from the CS drm/nvc0/copy: check PUNITS to determine which copy engines are disabled i915: Quirk no_lvds on Gigabyte GA-D525TUD ITX motherboard drm/i915: Use the correct size of the GTT for placing the per-process entries drm: Check for invalid cursor flags drm: Initialize object type when using DRM_MODE() macro drm/i915: fix color order for BGR formats on IVB drm/i915: fix wrong order of parameters in port checking functions
2 parents 318e151 + 6f33814 commit 155e36d

File tree

18 files changed

+174
-126
lines changed

18 files changed

+174
-126
lines changed

drivers/gpu/drm/drm_crtc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1981,7 +1981,7 @@ int drm_mode_cursor_ioctl(struct drm_device *dev,
19811981
if (!drm_core_check_feature(dev, DRIVER_MODESET))
19821982
return -EINVAL;
19831983

1984-
if (!req->flags)
1984+
if (!req->flags || (~DRM_MODE_CURSOR_FLAGS & req->flags))
19851985
return -EINVAL;
19861986

19871987
mutex_lock(&dev->mode_config.mutex);

drivers/gpu/drm/drm_edid.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ static struct edid_quirk {
8787
int product_id;
8888
u32 quirks;
8989
} edid_quirk_list[] = {
90+
/* ASUS VW222S */
91+
{ "ACI", 0x22a2, EDID_QUIRK_FORCE_REDUCED_BLANKING },
92+
9093
/* Acer AL1706 */
9194
{ "ACR", 44358, EDID_QUIRK_PREFER_LARGE_60 },
9295
/* Acer F51 */

drivers/gpu/drm/gma500/psb_intel_display.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1362,6 +1362,9 @@ void psb_intel_crtc_init(struct drm_device *dev, int pipe,
13621362
(struct drm_connector **) (psb_intel_crtc + 1);
13631363
psb_intel_crtc->mode_set.num_connectors = 0;
13641364
psb_intel_cursor_init(dev, psb_intel_crtc);
1365+
1366+
/* Set to true so that the pipe is forced off on initial config. */
1367+
psb_intel_crtc->active = true;
13651368
}
13661369

13671370
int psb_intel_get_pipe_from_crtc_id(struct drm_device *dev, void *data,

drivers/gpu/drm/i915/i915_gem_gtt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ int i915_gem_init_aliasing_ppgtt(struct drm_device *dev)
7272
/* ppgtt PDEs reside in the global gtt pagetable, which has 512*1024
7373
* entries. For aliasing ppgtt support we just steal them at the end for
7474
* now. */
75-
first_pd_entry_in_global_pt = 512*1024 - I915_PPGTT_PD_ENTRIES;
75+
first_pd_entry_in_global_pt = dev_priv->mm.gtt->gtt_total_entries - I915_PPGTT_PD_ENTRIES;
7676

7777
ppgtt = kzalloc(sizeof(*ppgtt), GFP_KERNEL);
7878
if (!ppgtt)

drivers/gpu/drm/i915/intel_display.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1384,7 +1384,7 @@ static void assert_pch_hdmi_disabled(struct drm_i915_private *dev_priv,
13841384
enum pipe pipe, int reg)
13851385
{
13861386
u32 val = I915_READ(reg);
1387-
WARN(hdmi_pipe_enabled(dev_priv, val, pipe),
1387+
WARN(hdmi_pipe_enabled(dev_priv, pipe, val),
13881388
"PCH HDMI (0x%08x) enabled on transcoder %c, should be disabled\n",
13891389
reg, pipe_name(pipe));
13901390

@@ -1404,13 +1404,13 @@ static void assert_pch_ports_disabled(struct drm_i915_private *dev_priv,
14041404

14051405
reg = PCH_ADPA;
14061406
val = I915_READ(reg);
1407-
WARN(adpa_pipe_enabled(dev_priv, val, pipe),
1407+
WARN(adpa_pipe_enabled(dev_priv, pipe, val),
14081408
"PCH VGA enabled on transcoder %c, should be disabled\n",
14091409
pipe_name(pipe));
14101410

14111411
reg = PCH_LVDS;
14121412
val = I915_READ(reg);
1413-
WARN(lvds_pipe_enabled(dev_priv, val, pipe),
1413+
WARN(lvds_pipe_enabled(dev_priv, pipe, val),
14141414
"PCH LVDS enabled on transcoder %c, should be disabled\n",
14151415
pipe_name(pipe));
14161416

@@ -1872,7 +1872,7 @@ static void disable_pch_hdmi(struct drm_i915_private *dev_priv,
18721872
enum pipe pipe, int reg)
18731873
{
18741874
u32 val = I915_READ(reg);
1875-
if (hdmi_pipe_enabled(dev_priv, val, pipe)) {
1875+
if (hdmi_pipe_enabled(dev_priv, pipe, val)) {
18761876
DRM_DEBUG_KMS("Disabling pch HDMI %x on pipe %d\n",
18771877
reg, pipe);
18781878
I915_WRITE(reg, val & ~PORT_ENABLE);
@@ -1894,12 +1894,12 @@ static void intel_disable_pch_ports(struct drm_i915_private *dev_priv,
18941894

18951895
reg = PCH_ADPA;
18961896
val = I915_READ(reg);
1897-
if (adpa_pipe_enabled(dev_priv, val, pipe))
1897+
if (adpa_pipe_enabled(dev_priv, pipe, val))
18981898
I915_WRITE(reg, val & ~ADPA_DAC_ENABLE);
18991899

19001900
reg = PCH_LVDS;
19011901
val = I915_READ(reg);
1902-
if (lvds_pipe_enabled(dev_priv, val, pipe)) {
1902+
if (lvds_pipe_enabled(dev_priv, pipe, val)) {
19031903
DRM_DEBUG_KMS("disable lvds on pipe %d val 0x%08x\n", pipe, val);
19041904
I915_WRITE(reg, val & ~LVDS_PORT_EN);
19051905
POSTING_READ(reg);

drivers/gpu/drm/i915/intel_lvds.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,14 @@ static const struct dmi_system_id intel_no_lvds[] = {
780780
DMI_MATCH(DMI_BOARD_NAME, "ZBOXSD-ID12/ID13"),
781781
},
782782
},
783+
{
784+
.callback = intel_no_lvds_dmi_callback,
785+
.ident = "Gigabyte GA-D525TUD",
786+
.matches = {
787+
DMI_MATCH(DMI_BOARD_VENDOR, "Gigabyte Technology Co., Ltd."),
788+
DMI_MATCH(DMI_BOARD_NAME, "D525TUD"),
789+
},
790+
},
783791

784792
{ } /* terminating entry */
785793
};

drivers/gpu/drm/i915/intel_sprite.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ ivb_update_plane(struct drm_plane *plane, struct drm_framebuffer *fb,
6060

6161
switch (fb->pixel_format) {
6262
case DRM_FORMAT_XBGR8888:
63-
sprctl |= SPRITE_FORMAT_RGBX888;
63+
sprctl |= SPRITE_FORMAT_RGBX888 | SPRITE_RGB_ORDER_RGBX;
6464
pixel_size = 4;
6565
break;
6666
case DRM_FORMAT_XRGB8888:
67-
sprctl |= SPRITE_FORMAT_RGBX888 | SPRITE_RGB_ORDER_RGBX;
67+
sprctl |= SPRITE_FORMAT_RGBX888;
6868
pixel_size = 4;
6969
break;
7070
case DRM_FORMAT_YUYV:

drivers/gpu/drm/nouveau/nouveau_state.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -736,9 +736,11 @@ nouveau_card_init(struct drm_device *dev)
736736
}
737737
break;
738738
case NV_C0:
739-
nvc0_copy_create(dev, 1);
739+
if (!(nv_rd32(dev, 0x022500) & 0x00000200))
740+
nvc0_copy_create(dev, 1);
740741
case NV_D0:
741-
nvc0_copy_create(dev, 0);
742+
if (!(nv_rd32(dev, 0x022500) & 0x00000100))
743+
nvc0_copy_create(dev, 0);
742744
break;
743745
default:
744746
break;

drivers/gpu/drm/radeon/atombios_crtc.c

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,6 @@ void atombios_crtc_dpms(struct drm_crtc *crtc, int mode)
258258
radeon_crtc->enabled = true;
259259
/* adjust pm to dpms changes BEFORE enabling crtcs */
260260
radeon_pm_compute_clocks(rdev);
261-
/* disable crtc pair power gating before programming */
262261
if (ASIC_IS_DCE6(rdev) && !radeon_crtc->in_mode_set)
263262
atombios_powergate_crtc(crtc, ATOM_DISABLE);
264263
atombios_enable_crtc(crtc, ATOM_ENABLE);
@@ -278,25 +277,8 @@ void atombios_crtc_dpms(struct drm_crtc *crtc, int mode)
278277
atombios_enable_crtc_memreq(crtc, ATOM_DISABLE);
279278
atombios_enable_crtc(crtc, ATOM_DISABLE);
280279
radeon_crtc->enabled = false;
281-
/* power gating is per-pair */
282-
if (ASIC_IS_DCE6(rdev) && !radeon_crtc->in_mode_set) {
283-
struct drm_crtc *other_crtc;
284-
struct radeon_crtc *other_radeon_crtc;
285-
list_for_each_entry(other_crtc, &rdev->ddev->mode_config.crtc_list, head) {
286-
other_radeon_crtc = to_radeon_crtc(other_crtc);
287-
if (((radeon_crtc->crtc_id == 0) && (other_radeon_crtc->crtc_id == 1)) ||
288-
((radeon_crtc->crtc_id == 1) && (other_radeon_crtc->crtc_id == 0)) ||
289-
((radeon_crtc->crtc_id == 2) && (other_radeon_crtc->crtc_id == 3)) ||
290-
((radeon_crtc->crtc_id == 3) && (other_radeon_crtc->crtc_id == 2)) ||
291-
((radeon_crtc->crtc_id == 4) && (other_radeon_crtc->crtc_id == 5)) ||
292-
((radeon_crtc->crtc_id == 5) && (other_radeon_crtc->crtc_id == 4))) {
293-
/* if both crtcs in the pair are off, enable power gating */
294-
if (other_radeon_crtc->enabled == false)
295-
atombios_powergate_crtc(crtc, ATOM_ENABLE);
296-
break;
297-
}
298-
}
299-
}
280+
if (ASIC_IS_DCE6(rdev) && !radeon_crtc->in_mode_set)
281+
atombios_powergate_crtc(crtc, ATOM_ENABLE);
300282
/* adjust pm to dpms changes AFTER disabling crtcs */
301283
radeon_pm_compute_clocks(rdev);
302284
break;
@@ -1682,9 +1664,22 @@ static void atombios_crtc_disable(struct drm_crtc *crtc)
16821664
struct drm_device *dev = crtc->dev;
16831665
struct radeon_device *rdev = dev->dev_private;
16841666
struct radeon_atom_ss ss;
1667+
int i;
16851668

16861669
atombios_crtc_dpms(crtc, DRM_MODE_DPMS_OFF);
16871670

1671+
for (i = 0; i < rdev->num_crtc; i++) {
1672+
if (rdev->mode_info.crtcs[i] &&
1673+
rdev->mode_info.crtcs[i]->enabled &&
1674+
i != radeon_crtc->crtc_id &&
1675+
radeon_crtc->pll_id == rdev->mode_info.crtcs[i]->pll_id) {
1676+
/* one other crtc is using this pll don't turn
1677+
* off the pll
1678+
*/
1679+
goto done;
1680+
}
1681+
}
1682+
16881683
switch (radeon_crtc->pll_id) {
16891684
case ATOM_PPLL1:
16901685
case ATOM_PPLL2:
@@ -1701,6 +1696,7 @@ static void atombios_crtc_disable(struct drm_crtc *crtc)
17011696
default:
17021697
break;
17031698
}
1699+
done:
17041700
radeon_crtc->pll_id = -1;
17051701
}
17061702

drivers/gpu/drm/radeon/atombios_dp.c

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -577,30 +577,25 @@ int radeon_dp_get_panel_mode(struct drm_encoder *encoder,
577577
struct radeon_device *rdev = dev->dev_private;
578578
struct radeon_connector *radeon_connector = to_radeon_connector(connector);
579579
int panel_mode = DP_PANEL_MODE_EXTERNAL_DP_MODE;
580+
u16 dp_bridge = radeon_connector_encoder_get_dp_bridge_encoder_id(connector);
581+
u8 tmp;
580582

581583
if (!ASIC_IS_DCE4(rdev))
582584
return panel_mode;
583585

584-
if (radeon_connector_encoder_get_dp_bridge_encoder_id(connector) ==
585-
ENCODER_OBJECT_ID_NUTMEG)
586-
panel_mode = DP_PANEL_MODE_INTERNAL_DP1_MODE;
587-
else if (radeon_connector_encoder_get_dp_bridge_encoder_id(connector) ==
588-
ENCODER_OBJECT_ID_TRAVIS) {
589-
u8 id[6];
590-
int i;
591-
for (i = 0; i < 6; i++)
592-
id[i] = radeon_read_dpcd_reg(radeon_connector, 0x503 + i);
593-
if (id[0] == 0x73 &&
594-
id[1] == 0x69 &&
595-
id[2] == 0x76 &&
596-
id[3] == 0x61 &&
597-
id[4] == 0x72 &&
598-
id[5] == 0x54)
586+
if (dp_bridge != ENCODER_OBJECT_ID_NONE) {
587+
/* DP bridge chips */
588+
tmp = radeon_read_dpcd_reg(radeon_connector, DP_EDP_CONFIGURATION_CAP);
589+
if (tmp & 1)
590+
panel_mode = DP_PANEL_MODE_INTERNAL_DP2_MODE;
591+
else if ((dp_bridge == ENCODER_OBJECT_ID_NUTMEG) ||
592+
(dp_bridge == ENCODER_OBJECT_ID_TRAVIS))
599593
panel_mode = DP_PANEL_MODE_INTERNAL_DP1_MODE;
600594
else
601-
panel_mode = DP_PANEL_MODE_INTERNAL_DP2_MODE;
595+
panel_mode = DP_PANEL_MODE_EXTERNAL_DP_MODE;
602596
} else if (connector->connector_type == DRM_MODE_CONNECTOR_eDP) {
603-
u8 tmp = radeon_read_dpcd_reg(radeon_connector, DP_EDP_CONFIGURATION_CAP);
597+
/* eDP */
598+
tmp = radeon_read_dpcd_reg(radeon_connector, DP_EDP_CONFIGURATION_CAP);
604599
if (tmp & 1)
605600
panel_mode = DP_PANEL_MODE_INTERNAL_DP2_MODE;
606601
}

0 commit comments

Comments
 (0)