From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerome Glisse Subject: Re: [PATCH] drm/radeon: tweak ACCEL_WORKING2 query for hawaii Date: Tue, 29 Jul 2014 13:10:06 -0400 Message-ID: <20140729171005.GB3103@gmail.com> References: <1406644398-2191-1-git-send-email-alexander.deucher@amd.com> <20140729153913.GA3103@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-qg0-f41.google.com (mail-qg0-f41.google.com [209.85.192.41]) by gabe.freedesktop.org (Postfix) with ESMTP id 8383B89230 for ; Tue, 29 Jul 2014 10:10:17 -0700 (PDT) Received: by mail-qg0-f41.google.com with SMTP id q107so10832781qgd.28 for ; Tue, 29 Jul 2014 10:10:17 -0700 (PDT) Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Alex Deucher Cc: Alex Deucher , Maling list - DRI developers List-Id: dri-devel@lists.freedesktop.org On Tue, Jul 29, 2014 at 01:05:15PM -0400, Alex Deucher wrote: > On Tue, Jul 29, 2014 at 11:39 AM, Jerome Glisse wrote: > > On Tue, Jul 29, 2014 at 10:33:18AM -0400, Alex Deucher wrote: > >> Return 2 so we can be sure the kernel has the necessary > >> changes for acceleration to work. > > > > I highly dislike that ? Why about just using nop2 in userspace ? > > How to we tell whether the version of mesa has that change or not? You do not need to know that in kernel, all that is needed is for userspace to test 3.16 kernel as it's all that is needed to get accel working. So i would say enable accel on ddx now because truly if someone update its ddx then it must have updated mesa too. > Also, packet2 nops are deprecated so may not work in future firmwares > if we end up updating them again. I do not want to go into discussion on closed source firmware, if they offer no API stability i would consider that utterly broken. > > Alex > > > > >> > >> Signed-off-by: Alex Deucher > >> --- > >> drivers/gpu/drm/radeon/radeon_kms.c | 9 ++++++++- > >> 1 file changed, 8 insertions(+), 1 deletion(-) > >> > >> diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c > >> index 35d9318..dcec4ff 100644 > >> --- a/drivers/gpu/drm/radeon/radeon_kms.c > >> +++ b/drivers/gpu/drm/radeon/radeon_kms.c > >> @@ -254,7 +254,14 @@ static int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file > >> } > >> break; > >> case RADEON_INFO_ACCEL_WORKING2: > >> - *value = rdev->accel_working; > >> + if (rdev->family == CHIP_HAWAII) { > >> + if (rdev->accel_working && rdev->new_fw) > >> + *value = 2; > >> + else > >> + *value = 0; > >> + } else { > >> + *value = rdev->accel_working; > >> + } > >> break; > >> case RADEON_INFO_TILING_CONFIG: > >> if (rdev->family >= CHIP_BONAIRE) > >> -- > >> 1.8.3.1 > >> > >> _______________________________________________ > >> dri-devel mailing list > >> dri-devel@lists.freedesktop.org > >> http://lists.freedesktop.org/mailman/listinfo/dri-devel