Skip to content

Commit 84d4db0

Browse files
committed
Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: drm/radeon/kms: add quirk to make HP DV5000 laptop resume drm/radeon/kms: fix RADEON_INFO_CRTC_FROM_ID info ioctl Fix ttm_page_alloc.c build breakage drm/radeon/kms: fix legacy LVDS dpms sequence drm/radeon/kms: drop taking lock around crtc lookup.
2 parents 38ea6e6 + 52fa2bb commit 84d4db0

File tree

7 files changed

+15
-10
lines changed

7 files changed

+15
-10
lines changed

drivers/gpu/drm/radeon/evergreen_cs.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,6 @@ static int evergreen_cs_packet_parse_vline(struct radeon_cs_parser *p)
333333
header = radeon_get_ib_value(p, h_idx);
334334
crtc_id = radeon_get_ib_value(p, h_idx + 2 + 7 + 1);
335335
reg = CP_PACKET0_GET_REG(header);
336-
mutex_lock(&p->rdev->ddev->mode_config.mutex);
337336
obj = drm_mode_object_find(p->rdev->ddev, crtc_id, DRM_MODE_OBJECT_CRTC);
338337
if (!obj) {
339338
DRM_ERROR("cannot find crtc %d\n", crtc_id);
@@ -368,7 +367,6 @@ static int evergreen_cs_packet_parse_vline(struct radeon_cs_parser *p)
368367
}
369368
}
370369
out:
371-
mutex_unlock(&p->rdev->ddev->mode_config.mutex);
372370
return r;
373371
}
374372

drivers/gpu/drm/radeon/r100.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,7 +1230,6 @@ int r100_cs_packet_parse_vline(struct radeon_cs_parser *p)
12301230
header = radeon_get_ib_value(p, h_idx);
12311231
crtc_id = radeon_get_ib_value(p, h_idx + 5);
12321232
reg = CP_PACKET0_GET_REG(header);
1233-
mutex_lock(&p->rdev->ddev->mode_config.mutex);
12341233
obj = drm_mode_object_find(p->rdev->ddev, crtc_id, DRM_MODE_OBJECT_CRTC);
12351234
if (!obj) {
12361235
DRM_ERROR("cannot find crtc %d\n", crtc_id);
@@ -1264,7 +1263,6 @@ int r100_cs_packet_parse_vline(struct radeon_cs_parser *p)
12641263
ib[h_idx + 3] |= RADEON_ENG_DISPLAY_SELECT_CRTC1;
12651264
}
12661265
out:
1267-
mutex_unlock(&p->rdev->ddev->mode_config.mutex);
12681266
return r;
12691267
}
12701268

drivers/gpu/drm/radeon/r600_cs.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ static int r600_cs_packet_parse_vline(struct radeon_cs_parser *p)
585585
header = radeon_get_ib_value(p, h_idx);
586586
crtc_id = radeon_get_ib_value(p, h_idx + 2 + 7 + 1);
587587
reg = CP_PACKET0_GET_REG(header);
588-
mutex_lock(&p->rdev->ddev->mode_config.mutex);
588+
589589
obj = drm_mode_object_find(p->rdev->ddev, crtc_id, DRM_MODE_OBJECT_CRTC);
590590
if (!obj) {
591591
DRM_ERROR("cannot find crtc %d\n", crtc_id);
@@ -620,7 +620,6 @@ static int r600_cs_packet_parse_vline(struct radeon_cs_parser *p)
620620
ib[h_idx + 4] = AVIVO_D2MODE_VLINE_STATUS >> 2;
621621
}
622622
out:
623-
mutex_unlock(&p->rdev->ddev->mode_config.mutex);
624623
return r;
625624
}
626625

drivers/gpu/drm/radeon/radeon_combios.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3050,6 +3050,14 @@ void radeon_combios_asic_init(struct drm_device *dev)
30503050
rdev->pdev->subsystem_device == 0x308b)
30513051
return;
30523052

3053+
/* quirk for rs4xx HP dv5000 laptop to make it resume
3054+
* - it hangs on resume inside the dynclk 1 table.
3055+
*/
3056+
if (rdev->family == CHIP_RS480 &&
3057+
rdev->pdev->subsystem_vendor == 0x103c &&
3058+
rdev->pdev->subsystem_device == 0x30a4)
3059+
return;
3060+
30533061
/* DYN CLK 1 */
30543062
table = combios_get_table_offset(dev, COMBIOS_DYN_CLK_1_TABLE);
30553063
if (table)

drivers/gpu/drm/radeon/radeon_kms.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
128128
for (i = 0, found = 0; i < rdev->num_crtc; i++) {
129129
crtc = (struct drm_crtc *)minfo->crtcs[i];
130130
if (crtc && crtc->base.id == value) {
131-
value = i;
131+
struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc);
132+
value = radeon_crtc->crtc_id;
132133
found = 1;
133134
break;
134135
}

drivers/gpu/drm/radeon/radeon_legacy_encoders.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ static void radeon_legacy_lvds_dpms(struct drm_encoder *encoder, int mode)
108108
udelay(panel_pwr_delay * 1000);
109109
WREG32(RADEON_LVDS_GEN_CNTL, lvds_gen_cntl);
110110
WREG32_PLL(RADEON_PIXCLKS_CNTL, pixclks_cntl);
111+
udelay(panel_pwr_delay * 1000);
111112
break;
112113
}
113114

drivers/gpu/drm/ttm/ttm_page_alloc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@
4040
#include <linux/slab.h>
4141

4242
#include <asm/atomic.h>
43-
#ifdef TTM_HAS_AGP
44-
#include <asm/agp.h>
45-
#endif
4643

4744
#include "ttm/ttm_bo_driver.h"
4845
#include "ttm/ttm_page_alloc.h"
4946

47+
#ifdef TTM_HAS_AGP
48+
#include <asm/agp.h>
49+
#endif
5050

5151
#define NUM_PAGES_TO_ALLOC (PAGE_SIZE/sizeof(struct page *))
5252
#define SMALL_ALLOCATION 16

0 commit comments

Comments
 (0)