All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jerome Glisse <glisse@freedesktop.org>
To: Alex Deucher <alexdeucher@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/radeon/kms: fix nsample tracking in r6xx/r7xx CS tracker
Date: Mon, 16 Aug 2010 09:54:01 -0400	[thread overview]
Message-ID: <4C6942F9.9020208@freedesktop.org> (raw)
In-Reply-To: <AANLkTinJrfk6M6zBPf=WnuVXDaH8e0QRApvqOFJpc2Rt@mail.gmail.com>

On 08/16/2010 09:22 AM, Alex Deucher wrote:
> On Mon, Aug 16, 2010 at 9:19 AM, Jerome Glisse <glisse@freedesktop.org> wrote:
>> On 08/13/2010 12:48 AM, Alex Deucher wrote:
>>> Initialize nsamples to 1 in case userspace does not emit
>>> PA_SC_AA_CONFIG.
>>>
>>> Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
>>> Cc: Andre Maasikas <amaasikas@gmail.com>
>>> ---
>>>  drivers/gpu/drm/radeon/r600_cs.c |    1 +
>>>  1 files changed, 1 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/radeon/r600_cs.c b/drivers/gpu/drm/radeon/r600_cs.c
>>> index 8e165b2..b03f93b 100644
>>> --- a/drivers/gpu/drm/radeon/r600_cs.c
>>> +++ b/drivers/gpu/drm/radeon/r600_cs.c
>>> @@ -163,6 +163,7 @@ static void r600_cs_track_init(struct r600_cs_track *track)
>>>       track->db_depth_size = 0xFFFFFFFF;
>>>       track->db_depth_size_idx = 0;
>>>       track->db_depth_control = 0xFFFFFFFF;
>>> +     track->nsamples = 1;
>>>  }
>>>
>>>  static inline int r600_cs_track_validate_cb(struct radeon_cs_parser *p, int i)
>>
>> I would NAK this one, accepting such things pretty much defeat the idea
>> of checker, i think userspace should always set nsamples as otherwise it
>> might trick kernel and overwritte others memory. ie:
>> cs1 set nsample 8 & all others properly so cs1 is accepted
>> cs2 don't set nsample but bind a smaller bo and so can overwritte others
>> buffer
> 
> Unfortunately, existing userspace already sends buffers without this
> reg set. It's just that prior to tiling we didn't care what it was set
> to.
> 
> Alex

I guess once again we hit by our own fault of prematurely going out of
staging.

Jerome

  reply	other threads:[~2010-08-16 13:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-13  4:48 [PATCH] drm/radeon/kms: fix nsample tracking in r6xx/r7xx CS tracker Alex Deucher
2010-08-16 13:19 ` Jerome Glisse
2010-08-16 13:22   ` Alex Deucher
2010-08-16 13:54     ` Jerome Glisse [this message]
2010-08-16 14:01       ` Alex Deucher
2010-08-16 20:39       ` Dave Airlie
2010-08-16 20:53         ` Alex Deucher
2010-08-16 21:02           ` 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=4C6942F9.9020208@freedesktop.org \
    --to=glisse@freedesktop.org \
    --cc=alexdeucher@gmail.com \
    --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.