All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: "Michel Dänzer" <michel@daenzer.net>
Cc: Brian King <brking@linux.vnet.ibm.com>,
	Jerome Glisse <jglisse@redhat.com>,
	Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>,
	Maling list - DRI developers <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] drm/radeon: Disable writeback by default on ppc
Date: Thu, 05 Dec 2013 15:06:50 +1100	[thread overview]
Message-ID: <1386216410.21910.3.camel@pasglop> (raw)
In-Reply-To: <1386210592.31665.24.camel@thor.local>

On Thu, 2013-12-05 at 11:29 +0900, Michel Dänzer wrote:
> On Don, 2013-12-05 at 12:39 +1100, Benjamin Herrenschmidt wrote:
> > On Wed, 2013-12-04 at 19:05 -0500, Alex Deucher wrote:
> > 
> > > > Setting CP_RB_CNTL.BUF_SWAP causes the CP to use the selected byte
> > > > swapping for just about everything accessed by the CP (rptr writeback,
> > > > indirect buffers, etc.).  Looks like the DMA ring supports and enables
> > > > rptr writeback as well (DMA_RB_CNTL.DMA_RPTR_WRITEBACK_SWAP_ENABLE) so
> > > > I think we can drop the swapping of the rptr writeback.
> > > >
> > > 
> > > Obvious patch attached.
> > 
> > This works all the way back to r300 ?
> 
> I don't think so, as I have writeback working without this patch on the
> RV350 in this PowerBook. So I think this function needs to be split,
> probably between R600 and older.

Or can we tell it to not swap (setup code) and continue doing
le32_to_cpu in the kernel ? Sounds better to me.

> Also, there's more code at least potentially affected by this, e.g. in: 
> 
>       * cik_compute_ring_get_rptr(), cik_compute_ring_get_wptr(),
>         cik_compute_ring_set_wptr(), cik_get_ih_wptr()
>       * si_get_ih_wptr()
>       * evergreen_get_ih_wptr()
>       * r600_get_ih_wptr()
>       * radeon_fence_write(), radeon_fence_read()
>       * radeon_ring_backup()

Yeah I'd say just don't swap, write LE to memory and let the kernel use
the right leXX_to_cpu.

HW swapping is evil :-)

Cheers,
Ben.


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

  reply	other threads:[~2013-12-05  4:07 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-17 14:06 [PATCH] drm/radeon: Disable writeback by default on ppc Adam Jackson
2013-06-17 15:04 ` Alex Deucher
2013-06-17 16:07   ` Adam Jackson
2013-06-17 22:57     ` Alex Deucher
2013-11-07 22:29       ` Benjamin Herrenschmidt
2013-11-08 13:43         ` Kleber Sacilotto de Souza
2013-11-24 23:15           ` Benjamin Herrenschmidt
2013-11-26  0:11             ` Kleber Sacilotto de Souza
2013-12-04 22:16               ` Kleber Sacilotto de Souza
2013-12-04 23:56                 ` Alex Deucher
2013-12-05  0:05                   ` Alex Deucher
2013-12-05  1:39                     ` Benjamin Herrenschmidt
2013-12-05  2:29                       ` Michel Dänzer
2013-12-05  4:06                         ` Benjamin Herrenschmidt [this message]
2013-12-05 14:42                           ` Alex Deucher
2013-12-06 13:58                             ` Kleber Sacilotto de Souza
2013-12-06 15:59                               ` Alex Deucher
2013-12-10  0:48                                 ` Alex Deucher
2013-12-10  2:20                                   ` Michel Dänzer
2013-12-10 15:04                                     ` Alex Deucher
2013-12-10 15:12                                       ` Alex Deucher
2014-01-02 20:54                                         ` Kleber Sacilotto de Souza
2014-01-02 22:48                                           ` Alex Deucher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1386216410.21910.3.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=brking@linux.vnet.ibm.com \
    --cc=cascardo@linux.vnet.ibm.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jglisse@redhat.com \
    --cc=michel@daenzer.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.