diff options
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_asic.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_asic.h | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/rv770d.h | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/uvd_v1_0.c | 14 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/uvd_v2_2.c | 29 |
5 files changed, 39 insertions, 13 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_asic.c b/drivers/gpu/drm/radeon/radeon_asic.c index fafd8ce4d58f..8dbf5083c4ff 100644 --- a/drivers/gpu/drm/radeon/radeon_asic.c +++ b/drivers/gpu/drm/radeon/radeon_asic.c | |||
@@ -1202,7 +1202,7 @@ static struct radeon_asic rs780_asic = { | |||
1202 | static struct radeon_asic_ring rv770_uvd_ring = { | 1202 | static struct radeon_asic_ring rv770_uvd_ring = { |
1203 | .ib_execute = &uvd_v1_0_ib_execute, | 1203 | .ib_execute = &uvd_v1_0_ib_execute, |
1204 | .emit_fence = &uvd_v2_2_fence_emit, | 1204 | .emit_fence = &uvd_v2_2_fence_emit, |
1205 | .emit_semaphore = &uvd_v1_0_semaphore_emit, | 1205 | .emit_semaphore = &uvd_v2_2_semaphore_emit, |
1206 | .cs_parse = &radeon_uvd_cs_parse, | 1206 | .cs_parse = &radeon_uvd_cs_parse, |
1207 | .ring_test = &uvd_v1_0_ring_test, | 1207 | .ring_test = &uvd_v1_0_ring_test, |
1208 | .ib_test = &uvd_v1_0_ib_test, | 1208 | .ib_test = &uvd_v1_0_ib_test, |
diff --git a/drivers/gpu/drm/radeon/radeon_asic.h b/drivers/gpu/drm/radeon/radeon_asic.h index cf0a90bb61ca..a3ca8cd305c5 100644 --- a/drivers/gpu/drm/radeon/radeon_asic.h +++ b/drivers/gpu/drm/radeon/radeon_asic.h | |||
@@ -949,6 +949,10 @@ void uvd_v1_0_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib); | |||
949 | int uvd_v2_2_resume(struct radeon_device *rdev); | 949 | int uvd_v2_2_resume(struct radeon_device *rdev); |
950 | void uvd_v2_2_fence_emit(struct radeon_device *rdev, | 950 | void uvd_v2_2_fence_emit(struct radeon_device *rdev, |
951 | struct radeon_fence *fence); | 951 | struct radeon_fence *fence); |
952 | bool uvd_v2_2_semaphore_emit(struct radeon_device *rdev, | ||
953 | struct radeon_ring *ring, | ||
954 | struct radeon_semaphore *semaphore, | ||
955 | bool emit_wait); | ||
952 | 956 | ||
953 | /* uvd v3.1 */ | 957 | /* uvd v3.1 */ |
954 | bool uvd_v3_1_semaphore_emit(struct radeon_device *rdev, | 958 | bool uvd_v3_1_semaphore_emit(struct radeon_device *rdev, |
diff --git a/drivers/gpu/drm/radeon/rv770d.h b/drivers/gpu/drm/radeon/rv770d.h index 3cf1e2921545..9ef2064b1c9c 100644 --- a/drivers/gpu/drm/radeon/rv770d.h +++ b/drivers/gpu/drm/radeon/rv770d.h | |||
@@ -989,6 +989,9 @@ | |||
989 | ((n) & 0x3FFF) << 16) | 989 | ((n) & 0x3FFF) << 16) |
990 | 990 | ||
991 | /* UVD */ | 991 | /* UVD */ |
992 | #define UVD_SEMA_ADDR_LOW 0xef00 | ||
993 | #define UVD_SEMA_ADDR_HIGH 0xef04 | ||
994 | #define UVD_SEMA_CMD 0xef08 | ||
992 | #define UVD_GPCOM_VCPU_CMD 0xef0c | 995 | #define UVD_GPCOM_VCPU_CMD 0xef0c |
993 | #define UVD_GPCOM_VCPU_DATA0 0xef10 | 996 | #define UVD_GPCOM_VCPU_DATA0 0xef10 |
994 | #define UVD_GPCOM_VCPU_DATA1 0xef14 | 997 | #define UVD_GPCOM_VCPU_DATA1 0xef14 |
diff --git a/drivers/gpu/drm/radeon/uvd_v1_0.c b/drivers/gpu/drm/radeon/uvd_v1_0.c index e72b3cb59358..c6b1cbca47fc 100644 --- a/drivers/gpu/drm/radeon/uvd_v1_0.c +++ b/drivers/gpu/drm/radeon/uvd_v1_0.c | |||
@@ -466,18 +466,8 @@ bool uvd_v1_0_semaphore_emit(struct radeon_device *rdev, | |||
466 | struct radeon_semaphore *semaphore, | 466 | struct radeon_semaphore *semaphore, |
467 | bool emit_wait) | 467 | bool emit_wait) |
468 | { | 468 | { |
469 | uint64_t addr = semaphore->gpu_addr; | 469 | /* disable semaphores for UVD V1 hardware */ |
470 | 470 | return false; | |
471 | radeon_ring_write(ring, PACKET0(UVD_SEMA_ADDR_LOW, 0)); | ||
472 | radeon_ring_write(ring, (addr >> 3) & 0x000FFFFF); | ||
473 | |||
474 | radeon_ring_write(ring, PACKET0(UVD_SEMA_ADDR_HIGH, 0)); | ||
475 | radeon_ring_write(ring, (addr >> 23) & 0x000FFFFF); | ||
476 | |||
477 | radeon_ring_write(ring, PACKET0(UVD_SEMA_CMD, 0)); | ||
478 | radeon_ring_write(ring, emit_wait ? 1 : 0); | ||
479 | |||
480 | return true; | ||
481 | } | 471 | } |
482 | 472 | ||
483 | /** | 473 | /** |
diff --git a/drivers/gpu/drm/radeon/uvd_v2_2.c b/drivers/gpu/drm/radeon/uvd_v2_2.c index 89193519f8a1..7ed778cec7c6 100644 --- a/drivers/gpu/drm/radeon/uvd_v2_2.c +++ b/drivers/gpu/drm/radeon/uvd_v2_2.c | |||
@@ -60,6 +60,35 @@ void uvd_v2_2_fence_emit(struct radeon_device *rdev, | |||
60 | } | 60 | } |
61 | 61 | ||
62 | /** | 62 | /** |
63 | * uvd_v2_2_semaphore_emit - emit semaphore command | ||
64 | * | ||
65 | * @rdev: radeon_device pointer | ||
66 | * @ring: radeon_ring pointer | ||
67 | * @semaphore: semaphore to emit commands for | ||
68 | * @emit_wait: true if we should emit a wait command | ||
69 | * | ||
70 | * Emit a semaphore command (either wait or signal) to the UVD ring. | ||
71 | */ | ||
72 | bool uvd_v2_2_semaphore_emit(struct radeon_device *rdev, | ||
73 | struct radeon_ring *ring, | ||
74 | struct radeon_semaphore *semaphore, | ||
75 | bool emit_wait) | ||
76 | { | ||
77 | uint64_t addr = semaphore->gpu_addr; | ||
78 | |||
79 | radeon_ring_write(ring, PACKET0(UVD_SEMA_ADDR_LOW, 0)); | ||
80 | radeon_ring_write(ring, (addr >> 3) & 0x000FFFFF); | ||
81 | |||
82 | radeon_ring_write(ring, PACKET0(UVD_SEMA_ADDR_HIGH, 0)); | ||
83 | radeon_ring_write(ring, (addr >> 23) & 0x000FFFFF); | ||
84 | |||
85 | radeon_ring_write(ring, PACKET0(UVD_SEMA_CMD, 0)); | ||
86 | radeon_ring_write(ring, emit_wait ? 1 : 0); | ||
87 | |||
88 | return true; | ||
89 | } | ||
90 | |||
91 | /** | ||
63 | * uvd_v2_2_resume - memory controller programming | 92 | * uvd_v2_2_resume - memory controller programming |
64 | * | 93 | * |
65 | * @rdev: radeon_device pointer | 94 | * @rdev: radeon_device pointer |