Re: [PATCH] drm/radeon: Disable writeback by default on ppc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2013-12-09 at 19:48 -0500, Alex Deucher wrote:
> 
> -u32 cik_compute_ring_get_wptr(struct radeon_device *rdev,
> -                             struct radeon_ring *ring)
> +u32 cik_compute_get_wptr(struct radeon_device *rdev,
> +                        struct radeon_ring *ring)
>  {
>         u32 wptr;
>  
>         if (rdev->wb.enabled) {
> -               wptr = le32_to_cpu(rdev->wb.wb[ring->wptr_offs/4]);
> +               wptr = rdev->wb.wb[ring->wptr_offs/4];
>         } else {
>                 mutex_lock(&rdev->srbm_mutex);
>                 cik_srbm_select(rdev, ring->me, ring->pipe,
> ring->queue, 0);
> @@ -4053,8 +4081,8 @@ u32 cik_compute_ring_get_wptr(struct
> radeon_device *rdev,
>         return wptr;
>  }
>  
> -void cik_compute_ring_set_wptr(struct radeon_device *rdev,
> -                              struct radeon_ring *ring)
> +void cik_compute_set_wptr(struct radeon_device *rdev,
> +                         struct radeon_ring *ring)
>  {
>         rdev->wb.wb[ring->wptr_offs/4] = cpu_to_le32(ring->wptr);

I think this cpu_to_le32() needs to be dropped as well to match
cik_compute_ring_get_wptr().


> diff --git a/drivers/gpu/drm/radeon/radeon.h
> b/drivers/gpu/drm/radeon/radeon.h
> index b1f990d..e7c02a7 100644
> --- a/drivers/gpu/drm/radeon/radeon.h
> +++ b/drivers/gpu/drm/radeon/radeon.h
> @@ -779,13 +779,11 @@ struct radeon_ring {
>         volatile uint32_t       *ring;
>         unsigned                rptr;
>         unsigned                rptr_offs;
> -       unsigned                rptr_reg;
>         unsigned                rptr_save_reg;
>         u64                     next_rptr_gpu_addr;
>         volatile u32            *next_rptr_cpu_addr;
>         unsigned                wptr;
>         unsigned                wptr_old;
> -       unsigned                wptr_reg;

What's the motivation for removing these? Seems like keeping them would
allow keeping this patch and the resulting code smaller (fewer function
variants) and cleaner (no if/else/... for the register offsets in the
variants).


-- 
Earthling Michel Dänzer            |                  http://www.amd.com
Libre software enthusiast          |                Mesa and X developer

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux