All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher@gmail.com>
To: "Christian König" <deathsimple@vodafone.de>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 14/15] drm/radeon: record what is next valid wptr for each ring v3
Date: Fri, 13 Jul 2012 08:27:56 -0400	[thread overview]
Message-ID: <CADnq5_N4SX8BCjy4Z+UunoiNQKjt2LZBunWi8pxV6EOvQS7VEQ@mail.gmail.com> (raw)
In-Reply-To: <4FFFE5B2.6020800@vodafone.de>

On Fri, Jul 13, 2012 at 5:09 AM, Christian König
<deathsimple@vodafone.de> wrote:
> On 12.07.2012 18:36, Alex Deucher wrote:
>>
>> On Thu, Jul 12, 2012 at 12:12 PM, Christian König
>> <deathsimple@vodafone.de> wrote:
>>>
>>> Before emitting any indirect buffer, emit the offset of the next
>>> valid ring content if any. This allow code that want to resume
>>> ring to resume ring right after ib that caused GPU lockup.
>>>
>>> v2: use scratch registers instead of storing it into memory
>>> v3: skip over the surface sync for ni and si as well
>>>
>>> Signed-off-by: Jerome Glisse <jglisse@redhat.com>
>>> Signed-off-by: Christian König <deathsimple@vodafone.de>
>>> ---
>>>   drivers/gpu/drm/radeon/evergreen.c   |    8 +++++++-
>>>   drivers/gpu/drm/radeon/ni.c          |   11 ++++++++++-
>>>   drivers/gpu/drm/radeon/r600.c        |   18 ++++++++++++++++--
>>>   drivers/gpu/drm/radeon/radeon.h      |    1 +
>>>   drivers/gpu/drm/radeon/radeon_ring.c |    4 ++++
>>>   drivers/gpu/drm/radeon/rv770.c       |    4 +++-
>>>   drivers/gpu/drm/radeon/si.c          |   22 +++++++++++++++++++---
>>>   7 files changed, 60 insertions(+), 8 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/radeon/evergreen.c
>>> b/drivers/gpu/drm/radeon/evergreen.c
>>> index f39b900..40de347 100644
>>> --- a/drivers/gpu/drm/radeon/evergreen.c
>>> +++ b/drivers/gpu/drm/radeon/evergreen.c
>>> @@ -1368,7 +1368,13 @@ void evergreen_ring_ib_execute(struct
>>> radeon_device *rdev, struct radeon_ib *ib)
>>>          /* set to DX10/11 mode */
>>>          radeon_ring_write(ring, PACKET3(PACKET3_MODE_CONTROL, 0));
>>>          radeon_ring_write(ring, 1);
>>> -       /* FIXME: implement */
>>> +
>>> +       if (ring->rptr_save_reg) {
>>> +               uint32_t next_rptr = ring->wptr + 2 + 4;
>>> +               radeon_ring_write(ring, PACKET0(ring->rptr_save_reg, 0));
>>> +               radeon_ring_write(ring, next_rptr);
>>> +       }
>>
>> On r600 and newer please use SET_CONFIG_REG rather than Packet0.
>
> Why? Please note that it's on purpose that this doesn't interfere with the
> top/bottom of pipe handling and the draw commands, e.g. the register write
> isn't associated with drawing but instead just marks the beginning of
> parsing the IB.

Packet0's are have been semi-deprecated since r600.  They still work,
but the CP guys recommend using the appropriate packet3 whenever
possible.

Alex

  reply	other threads:[~2012-07-13 12:27 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-12 16:12 Ring saving patches round 3 Christian König
2012-07-12 16:12 ` [PATCH 01/15] drm/radeon: add error handling to fence_wait_empty_locked Christian König
2012-07-12 16:12 ` [PATCH 02/15] drm/radeon: add error handling to radeon_vm_unbind_locked Christian König
2012-07-12 16:12 ` [PATCH 03/15] drm/radeon: fix fence related segfault in CS Christian König
2012-07-12 16:12 ` [PATCH 04/15] drm/radeon: add an exclusive lock for GPU reset v2 Christian König
2012-07-12 16:12 ` [PATCH 05/15] drm/radeon: fix ring commit padding Christian König
2012-07-12 16:12 ` [PATCH 06/15] drm/radeon: fix fence value access Christian König
2012-07-12 16:12 ` [PATCH 07/15] drm/radeon: fix fence init after resume Christian König
2012-07-12 16:12 ` [PATCH 08/15] drm/radeon: remove FIXME comment from chipset suspend Christian König
2012-07-12 16:12 ` [PATCH 09/15] drm/radeon: make cp init on cayman more robust Christian König
2012-07-12 16:12 ` [PATCH 10/15] drm/radeon: remove ip_pool start/suspend Christian König
2012-07-12 16:12 ` [PATCH 11/15] drm/radeon: remove r600_blit_suspend Christian König
2012-07-12 16:12 ` [PATCH 12/15] drm/radeon: remove vm_manager start/suspend Christian König
2012-07-12 16:12 ` [PATCH 13/15] drm/radeon: move radeon_ib_ring_tests out of chipset code Christian König
2012-07-12 16:12 ` [PATCH 14/15] drm/radeon: record what is next valid wptr for each ring v3 Christian König
2012-07-12 16:36   ` Alex Deucher
2012-07-13  9:09     ` Christian König
2012-07-13 12:27       ` Alex Deucher [this message]
2012-07-13 13:46         ` Christian König
2012-07-13 13:57           ` Alex Deucher
2012-07-16 23:13             ` Alex Deucher
2012-07-17  8:49               ` Christian König
2012-07-17 12:51                 ` Alex Deucher
2012-07-17 14:17                   ` Jerome Glisse
2012-07-17 14:37                     ` Christian König
2012-07-12 16:12 ` [PATCH 15/15] drm/radeon: implement ring saving on reset v4 Christian König

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=CADnq5_N4SX8BCjy4Z+UunoiNQKjt2LZBunWi8pxV6EOvQS7VEQ@mail.gmail.com \
    --to=alexdeucher@gmail.com \
    --cc=deathsimple@vodafone.de \
    --cc=dri-devel@lists.freedesktop.org \
    /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.