diff options
author | Ilija Hadzic <ihadzic@research.bell-labs.com> | 2011-10-12 23:29:42 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-10-18 05:06:34 -0400 |
commit | b353096345f928d8c1164117804d1407790fb5f3 (patch) | |
tree | 4c917ed950171311ee965ac23adbc61a94160fea /drivers/gpu/drm/radeon | |
parent | 8eec9d6f74271fb69770b9fa3fa7d3659128720b (diff) |
drm/radeon/kms: rename a variable for consistency
blit copy functions deal with GPU pages, not CPU pages,
so rename the variables and parameters accordingly
Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon')
-rw-r--r-- | drivers/gpu/drm/radeon/r600_blit_kms.c | 27 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_asic.h | 4 |
2 files changed, 16 insertions, 15 deletions
diff --git a/drivers/gpu/drm/radeon/r600_blit_kms.c b/drivers/gpu/drm/radeon/r600_blit_kms.c index 433115b3a75a..c4cf1308d4a1 100644 --- a/drivers/gpu/drm/radeon/r600_blit_kms.c +++ b/drivers/gpu/drm/radeon/r600_blit_kms.c | |||
@@ -628,14 +628,14 @@ static void r600_vb_ib_put(struct radeon_device *rdev) | |||
628 | radeon_ib_free(rdev, &rdev->r600_blit.vb_ib); | 628 | radeon_ib_free(rdev, &rdev->r600_blit.vb_ib); |
629 | } | 629 | } |
630 | 630 | ||
631 | static unsigned r600_blit_create_rect(unsigned num_pages, | 631 | static unsigned r600_blit_create_rect(unsigned num_gpu_pages, |
632 | int *width, int *height, int max_dim) | 632 | int *width, int *height, int max_dim) |
633 | { | 633 | { |
634 | unsigned max_pages; | 634 | unsigned max_pages; |
635 | unsigned pages = num_pages; | 635 | unsigned pages = num_gpu_pages; |
636 | int w, h; | 636 | int w, h; |
637 | 637 | ||
638 | if (num_pages == 0) { | 638 | if (num_gpu_pages == 0) { |
639 | /* not supposed to be called with no pages, but just in case */ | 639 | /* not supposed to be called with no pages, but just in case */ |
640 | h = 0; | 640 | h = 0; |
641 | w = 0; | 641 | w = 0; |
@@ -644,7 +644,7 @@ static unsigned r600_blit_create_rect(unsigned num_pages, | |||
644 | } else { | 644 | } else { |
645 | int rect_order = 2; | 645 | int rect_order = 2; |
646 | h = RECT_UNIT_H; | 646 | h = RECT_UNIT_H; |
647 | while (num_pages / rect_order) { | 647 | while (num_gpu_pages / rect_order) { |
648 | h *= 2; | 648 | h *= 2; |
649 | rect_order *= 4; | 649 | rect_order *= 4; |
650 | if (h >= max_dim) { | 650 | if (h >= max_dim) { |
@@ -674,7 +674,7 @@ static unsigned r600_blit_create_rect(unsigned num_pages, | |||
674 | } | 674 | } |
675 | 675 | ||
676 | 676 | ||
677 | int r600_blit_prepare_copy(struct radeon_device *rdev, unsigned num_pages) | 677 | int r600_blit_prepare_copy(struct radeon_device *rdev, unsigned num_gpu_pages) |
678 | { | 678 | { |
679 | int r; | 679 | int r; |
680 | int ring_size; | 680 | int ring_size; |
@@ -686,9 +686,10 @@ int r600_blit_prepare_copy(struct radeon_device *rdev, unsigned num_pages) | |||
686 | return r; | 686 | return r; |
687 | 687 | ||
688 | /* num loops */ | 688 | /* num loops */ |
689 | while (num_pages) { | 689 | while (num_gpu_pages) { |
690 | num_pages -= r600_blit_create_rect(num_pages, NULL, NULL, | 690 | num_gpu_pages -= |
691 | rdev->r600_blit.max_dim); | 691 | r600_blit_create_rect(num_gpu_pages, NULL, NULL, |
692 | rdev->r600_blit.max_dim); | ||
692 | num_loops++; | 693 | num_loops++; |
693 | } | 694 | } |
694 | 695 | ||
@@ -719,21 +720,21 @@ void r600_blit_done_copy(struct radeon_device *rdev, struct radeon_fence *fence) | |||
719 | 720 | ||
720 | void r600_kms_blit_copy(struct radeon_device *rdev, | 721 | void r600_kms_blit_copy(struct radeon_device *rdev, |
721 | u64 src_gpu_addr, u64 dst_gpu_addr, | 722 | u64 src_gpu_addr, u64 dst_gpu_addr, |
722 | unsigned num_pages) | 723 | unsigned num_gpu_pages) |
723 | { | 724 | { |
724 | u64 vb_gpu_addr; | 725 | u64 vb_gpu_addr; |
725 | u32 *vb; | 726 | u32 *vb; |
726 | 727 | ||
727 | DRM_DEBUG("emitting copy %16llx %16llx %d %d\n", | 728 | DRM_DEBUG("emitting copy %16llx %16llx %d %d\n", |
728 | src_gpu_addr, dst_gpu_addr, | 729 | src_gpu_addr, dst_gpu_addr, |
729 | num_pages, rdev->r600_blit.vb_used); | 730 | num_gpu_pages, rdev->r600_blit.vb_used); |
730 | vb = (u32 *)(rdev->r600_blit.vb_ib->ptr + rdev->r600_blit.vb_used); | 731 | vb = (u32 *)(rdev->r600_blit.vb_ib->ptr + rdev->r600_blit.vb_used); |
731 | 732 | ||
732 | while (num_pages) { | 733 | while (num_gpu_pages) { |
733 | int w, h; | 734 | int w, h; |
734 | unsigned size_in_bytes; | 735 | unsigned size_in_bytes; |
735 | unsigned pages_per_loop = | 736 | unsigned pages_per_loop = |
736 | r600_blit_create_rect(num_pages, &w, &h, | 737 | r600_blit_create_rect(num_gpu_pages, &w, &h, |
737 | rdev->r600_blit.max_dim); | 738 | rdev->r600_blit.max_dim); |
738 | 739 | ||
739 | size_in_bytes = pages_per_loop * RADEON_GPU_PAGE_SIZE; | 740 | size_in_bytes = pages_per_loop * RADEON_GPU_PAGE_SIZE; |
@@ -777,6 +778,6 @@ void r600_kms_blit_copy(struct radeon_device *rdev, | |||
777 | rdev->r600_blit.vb_used += 4*12; | 778 | rdev->r600_blit.vb_used += 4*12; |
778 | src_gpu_addr += size_in_bytes; | 779 | src_gpu_addr += size_in_bytes; |
779 | dst_gpu_addr += size_in_bytes; | 780 | dst_gpu_addr += size_in_bytes; |
780 | num_pages -= pages_per_loop; | 781 | num_gpu_pages -= pages_per_loop; |
781 | } | 782 | } |
782 | } | 783 | } |
diff --git a/drivers/gpu/drm/radeon/radeon_asic.h b/drivers/gpu/drm/radeon/radeon_asic.h index 24402e94d815..cd60da562ecd 100644 --- a/drivers/gpu/drm/radeon/radeon_asic.h +++ b/drivers/gpu/drm/radeon/radeon_asic.h | |||
@@ -364,11 +364,11 @@ void r600_hdmi_init(struct drm_encoder *encoder); | |||
364 | int r600_hdmi_buffer_status_changed(struct drm_encoder *encoder); | 364 | int r600_hdmi_buffer_status_changed(struct drm_encoder *encoder); |
365 | void r600_hdmi_update_audio_settings(struct drm_encoder *encoder); | 365 | void r600_hdmi_update_audio_settings(struct drm_encoder *encoder); |
366 | /* r600 blit */ | 366 | /* r600 blit */ |
367 | int r600_blit_prepare_copy(struct radeon_device *rdev, unsigned num_pages); | 367 | int r600_blit_prepare_copy(struct radeon_device *rdev, unsigned num_gpu_pages); |
368 | void r600_blit_done_copy(struct radeon_device *rdev, struct radeon_fence *fence); | 368 | void r600_blit_done_copy(struct radeon_device *rdev, struct radeon_fence *fence); |
369 | void r600_kms_blit_copy(struct radeon_device *rdev, | 369 | void r600_kms_blit_copy(struct radeon_device *rdev, |
370 | u64 src_gpu_addr, u64 dst_gpu_addr, | 370 | u64 src_gpu_addr, u64 dst_gpu_addr, |
371 | unsigned num_pages); | 371 | unsigned num_gpu_pages); |
372 | 372 | ||
373 | /* | 373 | /* |
374 | * rv770,rv730,rv710,rv740 | 374 | * rv770,rv730,rv710,rv740 |