Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 155997
b: refs/heads/master
c: 4162338
h: refs/heads/master
i:
  155995: ad4877e
v: v3
  • Loading branch information
Dave Airlie committed Jul 15, 2009
1 parent f7ccb23 commit 12dd5b6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6cdf65855cf884712532fc72770baaef7bdf1b9a
refs/heads/master: 4162338a1dab388474d4115289d1d7071623f04d
2 changes: 1 addition & 1 deletion trunk/drivers/gpu/drm/radeon/radeon_cursor.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ static void radeon_set_cursor(struct drm_crtc *crtc, struct drm_gem_object *obj,
WREG32(AVIVO_D1CUR_SURFACE_ADDRESS + radeon_crtc->crtc_offset, gpu_addr);
else
/* offset is from DISP(2)_BASE_ADDRESS */
WREG32(RADEON_CUR_OFFSET + radeon_crtc->crtc_offset, gpu_addr);
WREG32(RADEON_CUR_OFFSET + radeon_crtc->crtc_offset, (gpu_addr-radeon_crtc->legacy_display_base_addr));
}

int radeon_crtc_cursor_set(struct drm_crtc *crtc,
Expand Down
11 changes: 7 additions & 4 deletions trunk/drivers/gpu/drm/radeon/radeon_legacy_crtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,12 @@ int radeon_crtc_set_base(struct drm_crtc *crtc, int x, int y,
if (radeon_gem_object_pin(obj, RADEON_GEM_DOMAIN_VRAM, &base)) {
return -EINVAL;
}
crtc_offset = (u32)base;
/* if scanout was in GTT this really wouldn't work */
/* crtc offset is from display base addr not FB location */
radeon_crtc->legacy_display_base_addr = rdev->mc.vram_location;

base -= radeon_crtc->legacy_display_base_addr;

crtc_offset_cntl = 0;

pitch_pixels = crtc->fb->pitch / (crtc->fb->bits_per_pixel / 8);
Expand Down Expand Up @@ -303,11 +308,9 @@ int radeon_crtc_set_base(struct drm_crtc *crtc, int x, int y,

base &= ~7;

/* update sarea TODO */

crtc_offset = (u32)base;

WREG32(RADEON_DISPLAY_BASE_ADDR + radeon_crtc->crtc_offset, rdev->mc.vram_location);
WREG32(RADEON_DISPLAY_BASE_ADDR + radeon_crtc->crtc_offset, radeon_crtc->legacy_display_base_addr);

if (ASIC_IS_R300(rdev)) {
if (radeon_crtc->crtc_id)
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/gpu/drm/radeon/radeon_mode.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ struct radeon_crtc {
uint64_t cursor_addr;
int cursor_width;
int cursor_height;
uint32_t legacy_display_base_addr;
};

#define RADEON_USE_RMX 1
Expand Down

0 comments on commit 12dd5b6

Please sign in to comment.