Skip to content

Commit 3bf7706

Browse files
committed
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes from Dave Airlie: "Mostly intel and radeon fixes, one tda998x, one kconfig dep fix and two more MAINTAINERS updates, All pretty run of the mill for this stage" * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: drm/radeon/atom: select the proper number of lanes in transmitter setup MAINTAINERS: add maintainer entry for TDA998x driver drm: fix bochs kconfig dependencies drm/radeon/dpm: fix typo in EVERGREEN_SMC_FIRMWARE_HEADER_softRegisters drm/radeon/cik: fix typo in documentation drm/radeon: silence GCC warning on 32 bit drm/radeon: resume old pm late drm/radeon: TTM must be init with cpu-visible VRAM, v2 DRM: armada: fix use of kfifo_put() drm/i915: Reject >165MHz modes w/ DVI monitors drm/i915: fix assert_cursor on BDW drm/i915: vlv: reserve GT power context early drm/i915: fix pch pci device enumeration drm/i915: Resolving the memory region conflict for Stolen area drm/i915: use backlight legacy combination mode also for i915gm/i945gm MAINTAINERS: update AGP tree to point at drm tree
2 parents 2a75184 + 45db98e commit 3bf7706

27 files changed

Lines changed: 70 additions & 65 deletions

‎MAINTAINERS‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ F: net/rxrpc/af_rxrpc.c
474474

475475
AGPGART DRIVER
476476
M: David Airlie <airlied@linux.ie>
477-
T: git git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6.git
477+
T: git git://people.freedesktop.org/~airlied/linux (part of drm maint)
478478
S: Maintained
479479
F: drivers/char/agp/
480480
F: include/linux/agp*
@@ -6175,6 +6175,12 @@ S: Supported
61756175
F: drivers/block/nvme*
61766176
F: include/linux/nvme.h
61776177

6178+
NXP TDA998X DRM DRIVER
6179+
M: Russell King <rmk+kernel@arm.linux.org.uk>
6180+
S: Supported
6181+
F: drivers/gpu/drm/i2c/tda998x_drv.c
6182+
F: include/drm/i2c/tda998x.h
6183+
61786184
OMAP SUPPORT
61796185
M: Tony Lindgren <tony@atomide.com>
61806186
L: linux-omap@vger.kernel.org

‎drivers/gpu/drm/armada/armada_drv.c‎

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,7 @@ void __armada_drm_queue_unref_work(struct drm_device *dev,
6868
{
6969
struct armada_private *priv = dev->dev_private;
7070

71-
/*
72-
* Yes, we really must jump through these hoops just to store a
73-
* _pointer_ to something into the kfifo. This is utterly insane
74-
* and idiotic, because it kfifo requires the _data_ pointed to by
75-
* the pointer const, not the pointer itself. Not only that, but
76-
* you have to pass a pointer _to_ the pointer you want stored.
77-
*/
78-
const struct drm_framebuffer *silly_api_alert = fb;
79-
WARN_ON(!kfifo_put(&priv->fb_unref, &silly_api_alert));
71+
WARN_ON(!kfifo_put(&priv->fb_unref, fb));
8072
schedule_work(&priv->fb_unref_work);
8173
}
8274

‎drivers/gpu/drm/bochs/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ config DRM_BOCHS
22
tristate "DRM Support for bochs dispi vga interface (qemu stdvga)"
33
depends on DRM && PCI
44
select DRM_KMS_HELPER
5+
select DRM_KMS_FB_HELPER
56
select FB_SYS_FILLRECT
67
select FB_SYS_COPYAREA
78
select FB_SYS_IMAGEBLIT

‎drivers/gpu/drm/i915/i915_drv.c‎

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ MODULE_DEVICE_TABLE(pci, pciidlist);
403403
void intel_detect_pch(struct drm_device *dev)
404404
{
405405
struct drm_i915_private *dev_priv = dev->dev_private;
406-
struct pci_dev *pch;
406+
struct pci_dev *pch = NULL;
407407

408408
/* In all current cases, num_pipes is equivalent to the PCH_NOP setting
409409
* (which really amounts to a PCH but no South Display).
@@ -424,12 +424,9 @@ void intel_detect_pch(struct drm_device *dev)
424424
* all the ISA bridge devices and check for the first match, instead
425425
* of only checking the first one.
426426
*/
427-
pch = pci_get_class(PCI_CLASS_BRIDGE_ISA << 8, NULL);
428-
while (pch) {
429-
struct pci_dev *curr = pch;
427+
while ((pch = pci_get_class(PCI_CLASS_BRIDGE_ISA << 8, pch))) {
430428
if (pch->vendor == PCI_VENDOR_ID_INTEL) {
431-
unsigned short id;
432-
id = pch->device & INTEL_PCH_DEVICE_ID_MASK;
429+
unsigned short id = pch->device & INTEL_PCH_DEVICE_ID_MASK;
433430
dev_priv->pch_id = id;
434431

435432
if (id == INTEL_PCH_IBX_DEVICE_ID_TYPE) {
@@ -461,18 +458,16 @@ void intel_detect_pch(struct drm_device *dev)
461458
DRM_DEBUG_KMS("Found LynxPoint LP PCH\n");
462459
WARN_ON(!IS_HASWELL(dev));
463460
WARN_ON(!IS_ULT(dev));
464-
} else {
465-
goto check_next;
466-
}
467-
pci_dev_put(pch);
461+
} else
462+
continue;
463+
468464
break;
469465
}
470-
check_next:
471-
pch = pci_get_class(PCI_CLASS_BRIDGE_ISA << 8, curr);
472-
pci_dev_put(curr);
473466
}
474467
if (!pch)
475-
DRM_DEBUG_KMS("No PCH found?\n");
468+
DRM_DEBUG_KMS("No PCH found.\n");
469+
470+
pci_dev_put(pch);
476471
}
477472

478473
bool i915_semaphore_is_enabled(struct drm_device *dev)

‎drivers/gpu/drm/i915/i915_gem_stolen.c‎

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,22 @@ static unsigned long i915_stolen_to_physical(struct drm_device *dev)
8282
r = devm_request_mem_region(dev->dev, base, dev_priv->gtt.stolen_size,
8383
"Graphics Stolen Memory");
8484
if (r == NULL) {
85-
DRM_ERROR("conflict detected with stolen region: [0x%08x - 0x%08x]\n",
86-
base, base + (uint32_t)dev_priv->gtt.stolen_size);
87-
base = 0;
85+
/*
86+
* One more attempt but this time requesting region from
87+
* base + 1, as we have seen that this resolves the region
88+
* conflict with the PCI Bus.
89+
* This is a BIOS w/a: Some BIOS wrap stolen in the root
90+
* PCI bus, but have an off-by-one error. Hence retry the
91+
* reservation starting from 1 instead of 0.
92+
*/
93+
r = devm_request_mem_region(dev->dev, base + 1,
94+
dev_priv->gtt.stolen_size - 1,
95+
"Graphics Stolen Memory");
96+
if (r == NULL) {
97+
DRM_ERROR("conflict detected with stolen region: [0x%08x - 0x%08x]\n",
98+
base, base + (uint32_t)dev_priv->gtt.stolen_size);
99+
base = 0;
100+
}
88101
}
89102

90103
return base;

‎drivers/gpu/drm/i915/intel_display.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,12 +1092,12 @@ static void assert_cursor(struct drm_i915_private *dev_priv,
10921092
struct drm_device *dev = dev_priv->dev;
10931093
bool cur_state;
10941094

1095-
if (IS_IVYBRIDGE(dev) || IS_HASWELL(dev))
1096-
cur_state = I915_READ(CURCNTR_IVB(pipe)) & CURSOR_MODE;
1097-
else if (IS_845G(dev) || IS_I865G(dev))
1095+
if (IS_845G(dev) || IS_I865G(dev))
10981096
cur_state = I915_READ(_CURACNTR) & CURSOR_ENABLE;
1099-
else
1097+
else if (INTEL_INFO(dev)->gen <= 6 || IS_VALLEYVIEW(dev))
11001098
cur_state = I915_READ(CURCNTR(pipe)) & CURSOR_MODE;
1099+
else
1100+
cur_state = I915_READ(CURCNTR_IVB(pipe)) & CURSOR_MODE;
11011101

11021102
WARN(cur_state != state,
11031103
"cursor on pipe %c assertion failure (expected %s, current %s)\n",

‎drivers/gpu/drm/i915/intel_hdmi.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ static int hdmi_portclock_limit(struct intel_hdmi *hdmi)
845845
{
846846
struct drm_device *dev = intel_hdmi_to_dev(hdmi);
847847

848-
if (IS_G4X(dev))
848+
if (!hdmi->has_hdmi_sink || IS_G4X(dev))
849849
return 165000;
850850
else if (IS_HASWELL(dev) || INTEL_INFO(dev)->gen >= 8)
851851
return 300000;
@@ -899,8 +899,8 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder,
899899
* outputs. We also need to check that the higher clock still fits
900900
* within limits.
901901
*/
902-
if (pipe_config->pipe_bpp > 8*3 && clock_12bpc <= portclock_limit
903-
&& HAS_PCH_SPLIT(dev)) {
902+
if (pipe_config->pipe_bpp > 8*3 && intel_hdmi->has_hdmi_sink &&
903+
clock_12bpc <= portclock_limit && HAS_PCH_SPLIT(dev)) {
904904
DRM_DEBUG_KMS("picking bpc to 12 for HDMI output\n");
905905
desired_bpp = 12*3;
906906

‎drivers/gpu/drm/i915/intel_panel.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ static void i9xx_enable_backlight(struct intel_connector *connector)
698698
freq /= 0xff;
699699

700700
ctl = freq << 17;
701-
if (IS_GEN2(dev) && panel->backlight.combination_mode)
701+
if (panel->backlight.combination_mode)
702702
ctl |= BLM_LEGACY_MODE;
703703
if (IS_PINEVIEW(dev) && panel->backlight.active_low_pwm)
704704
ctl |= BLM_POLARITY_PNV;
@@ -979,7 +979,7 @@ static int i9xx_setup_backlight(struct intel_connector *connector)
979979

980980
ctl = I915_READ(BLC_PWM_CTL);
981981

982-
if (IS_GEN2(dev))
982+
if (IS_GEN2(dev) || IS_I915GM(dev) || IS_I945GM(dev))
983983
panel->backlight.combination_mode = ctl & BLM_LEGACY_MODE;
984984

985985
if (IS_PINEVIEW(dev))

‎drivers/gpu/drm/i915/intel_pm.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3493,6 +3493,8 @@ static void valleyview_setup_pctx(struct drm_device *dev)
34933493
u32 pcbr;
34943494
int pctx_size = 24*1024;
34953495

3496+
WARN_ON(!mutex_is_locked(&dev->struct_mutex));
3497+
34963498
pcbr = I915_READ(VLV_PCBR);
34973499
if (pcbr) {
34983500
/* BIOS set it up already, grab the pre-alloc'd space */
@@ -3542,8 +3544,6 @@ static void valleyview_enable_rps(struct drm_device *dev)
35423544
I915_WRITE(GTFIFODBG, gtfifodbg);
35433545
}
35443546

3545-
valleyview_setup_pctx(dev);
3546-
35473547
/* If VLV, Forcewake all wells, else re-direct to regular path */
35483548
gen6_gt_force_wake_get(dev_priv, FORCEWAKE_ALL);
35493549

@@ -4395,6 +4395,8 @@ void intel_enable_gt_powersave(struct drm_device *dev)
43954395
ironlake_enable_rc6(dev);
43964396
intel_init_emon(dev);
43974397
} else if (IS_GEN6(dev) || IS_GEN7(dev)) {
4398+
if (IS_VALLEYVIEW(dev))
4399+
valleyview_setup_pctx(dev);
43984400
/*
43994401
* PCU communication is slow and this doesn't need to be
44004402
* done at any specific time, so do this out of our fast path

‎drivers/gpu/drm/radeon/atombios_encoders.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1314,7 +1314,7 @@ atombios_dig_transmitter_setup(struct drm_encoder *encoder, int action, uint8_t
13141314
}
13151315
if (is_dp)
13161316
args.v5.ucLaneNum = dp_lane_count;
1317-
else if (radeon_encoder->pixel_clock > 165000)
1317+
else if (radeon_dig_monitor_is_duallink(encoder, radeon_encoder->pixel_clock))
13181318
args.v5.ucLaneNum = 8;
13191319
else
13201320
args.v5.ucLaneNum = 4;

0 commit comments

Comments
 (0)