From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerome Glisse Subject: Re: [PATCH] drm/radeon/kms: fix nsample tracking in r6xx/r7xx CS tracker Date: Mon, 16 Aug 2010 09:54:01 -0400 Message-ID: <4C6942F9.9020208@freedesktop.org> References: <1281674907-5295-1-git-send-email-alexdeucher@gmail.com> <4C693ACC.6040702@freedesktop.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from protox.org (unknown [95.130.11.66]) by gabe.freedesktop.org (Postfix) with ESMTP id E8CC29ECD1 for ; Mon, 16 Aug 2010 06:53:57 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Alex Deucher Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On 08/16/2010 09:22 AM, Alex Deucher wrote: > On Mon, Aug 16, 2010 at 9:19 AM, Jerome Glisse 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 >>> Cc: Andre Maasikas >>> --- >>> 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