All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/radeon: fix cut and paste issue for hawaii.
@ 2014-07-24 23:51 Alex Deucher
  2014-07-24 23:51 ` [PATCH 2/2] drm/radeon: add new info ioctl query for hawaii accel Alex Deucher
  0 siblings, 1 reply; 9+ messages in thread
From: Alex Deucher @ 2014-07-24 23:51 UTC (permalink / raw)
  To: dri-devel; +Cc: Alex Deucher, Jerome Glisse, stable

From: Jerome Glisse <jglisse@redhat.com>

This is a halfway fix for hawaii acceleration. More fixes to come
but hopefully isolated to userspace.

Signed-off-by: Jérôme Glisse <jglisse@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/radeon/cik.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c
index b5e1ce3..44d25da 100644
--- a/drivers/gpu/drm/radeon/cik.c
+++ b/drivers/gpu/drm/radeon/cik.c
@@ -2515,6 +2515,7 @@ static void cik_tiling_mode_table_init(struct radeon_device *rdev)
 				gb_tile_moden = 0;
 				break;
 			}
+			rdev->config.cik.macrotile_mode_array[reg_offset] = gb_tile_moden;
 			WREG32(GB_MACROTILE_MODE0 + (reg_offset * 4), gb_tile_moden);
 		}
 	} else if (num_pipe_configs == 8) {
-- 
1.8.3.1

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

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/2] drm/radeon: add new info ioctl query for hawaii accel
  2014-07-24 23:51 [PATCH 1/2] drm/radeon: fix cut and paste issue for hawaii Alex Deucher
@ 2014-07-24 23:51 ` Alex Deucher
  2014-07-25  2:05   ` Michel Dänzer
  0 siblings, 1 reply; 9+ messages in thread
From: Alex Deucher @ 2014-07-24 23:51 UTC (permalink / raw)
  To: dri-devel; +Cc: Alex Deucher

We need to make sure we have a new enough firmware with
the fixed nop packet.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/radeon/radeon_kms.c | 6 ++++++
 include/uapi/drm/radeon_drm.h       | 1 +
 2 files changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
index 35d9318..3ea9f59 100644
--- a/drivers/gpu/drm/radeon/radeon_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_kms.c
@@ -529,6 +529,12 @@ static int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file
 		else
 			*value = 1;
 		break;
+	case RADEON_INFO_HAWAII_ACCEL:
+		if (rdev->new_fw)
+			*value = 1;
+		else
+			*value = 0;
+		break;
 	default:
 		DRM_DEBUG_KMS("Invalid request %d\n", info->request);
 		return -EINVAL;
diff --git a/include/uapi/drm/radeon_drm.h b/include/uapi/drm/radeon_drm.h
index 509b2d7..a41dec3 100644
--- a/include/uapi/drm/radeon_drm.h
+++ b/include/uapi/drm/radeon_drm.h
@@ -1010,6 +1010,7 @@ struct drm_radeon_cs {
 #define RADEON_INFO_VRAM_USAGE		0x1e
 #define RADEON_INFO_GTT_USAGE		0x1f
 #define RADEON_INFO_ACTIVE_CU_COUNT	0x20
+#define RADEON_INFO_HAWAII_ACCEL	0x21
 
 struct drm_radeon_info {
 	uint32_t		request;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] drm/radeon: add new info ioctl query for hawaii accel
  2014-07-24 23:51 ` [PATCH 2/2] drm/radeon: add new info ioctl query for hawaii accel Alex Deucher
@ 2014-07-25  2:05   ` Michel Dänzer
  2014-07-25  2:06     ` Michel Dänzer
  0 siblings, 1 reply; 9+ messages in thread
From: Michel Dänzer @ 2014-07-25  2:05 UTC (permalink / raw)
  To: Alex Deucher; +Cc: dri-devel

On 25.07.2014 08:51, Alex Deucher wrote:
> We need to make sure we have a new enough firmware with
> the fixed nop packet.
> 
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
>  drivers/gpu/drm/radeon/radeon_kms.c | 6 ++++++
>  include/uapi/drm/radeon_drm.h       | 1 +
>  2 files changed, 7 insertions(+)
> 
> diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
> index 35d9318..3ea9f59 100644
> --- a/drivers/gpu/drm/radeon/radeon_kms.c
> +++ b/drivers/gpu/drm/radeon/radeon_kms.c
> @@ -529,6 +529,12 @@ static int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file
>  		else
>  			*value = 1;
>  		break;
> +	case RADEON_INFO_HAWAII_ACCEL:
> +		if (rdev->new_fw)
> +			*value = 1;
> +		else
> +			*value = 0;
> +		break;
>  	default:
>  		DRM_DEBUG_KMS("Invalid request %d\n", info->request);
>  		return -EINVAL;
> diff --git a/include/uapi/drm/radeon_drm.h b/include/uapi/drm/radeon_drm.h
> index 509b2d7..a41dec3 100644
> --- a/include/uapi/drm/radeon_drm.h
> +++ b/include/uapi/drm/radeon_drm.h
> @@ -1010,6 +1010,7 @@ struct drm_radeon_cs {
>  #define RADEON_INFO_VRAM_USAGE		0x1e
>  #define RADEON_INFO_GTT_USAGE		0x1f
>  #define RADEON_INFO_ACTIVE_CU_COUNT	0x20
> +#define RADEON_INFO_HAWAII_ACCEL	0x21
>  
>  struct drm_radeon_info {
>  	uint32_t		request;
> 

Please make the RADEON_INFO_ACCEL_WORKING(2) ioctl do the right thing
for Hawaii instead of adding yet another one.


-- 
Earthling Michel Dänzer            |                  http://www.amd.com
Libre software enthusiast          |                Mesa and X developer

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] drm/radeon: add new info ioctl query for hawaii accel
  2014-07-25  2:05   ` Michel Dänzer
@ 2014-07-25  2:06     ` Michel Dänzer
  2014-07-25  2:24       ` Michel Dänzer
  0 siblings, 1 reply; 9+ messages in thread
From: Michel Dänzer @ 2014-07-25  2:06 UTC (permalink / raw)
  To: Alex Deucher; +Cc: dri-devel

On 25.07.2014 11:05, Michel Dänzer wrote:
> On 25.07.2014 08:51, Alex Deucher wrote:
>> We need to make sure we have a new enough firmware with
>> the fixed nop packet.
>>
>> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
>> ---
>>  drivers/gpu/drm/radeon/radeon_kms.c | 6 ++++++
>>  include/uapi/drm/radeon_drm.h       | 1 +
>>  2 files changed, 7 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
>> index 35d9318..3ea9f59 100644
>> --- a/drivers/gpu/drm/radeon/radeon_kms.c
>> +++ b/drivers/gpu/drm/radeon/radeon_kms.c
>> @@ -529,6 +529,12 @@ static int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file
>>  		else
>>  			*value = 1;
>>  		break;
>> +	case RADEON_INFO_HAWAII_ACCEL:
>> +		if (rdev->new_fw)
>> +			*value = 1;
>> +		else
>> +			*value = 0;
>> +		break;
>>  	default:
>>  		DRM_DEBUG_KMS("Invalid request %d\n", info->request);
>>  		return -EINVAL;
>> diff --git a/include/uapi/drm/radeon_drm.h b/include/uapi/drm/radeon_drm.h
>> index 509b2d7..a41dec3 100644
>> --- a/include/uapi/drm/radeon_drm.h
>> +++ b/include/uapi/drm/radeon_drm.h
>> @@ -1010,6 +1010,7 @@ struct drm_radeon_cs {
>>  #define RADEON_INFO_VRAM_USAGE		0x1e
>>  #define RADEON_INFO_GTT_USAGE		0x1f
>>  #define RADEON_INFO_ACTIVE_CU_COUNT	0x20
>> +#define RADEON_INFO_HAWAII_ACCEL	0x21
>>  
>>  struct drm_radeon_info {
>>  	uint32_t		request;
>>
> 
> Please make the RADEON_INFO_ACCEL_WORKING(2) ioctl do the right thing
> for Hawaii instead of adding yet another one.

Ugh, s/ioctl/info query/ of course.


-- 
Earthling Michel Dänzer            |                  http://www.amd.com
Libre software enthusiast          |                Mesa and X developer

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] drm/radeon: add new info ioctl query for hawaii accel
  2014-07-25  2:06     ` Michel Dänzer
@ 2014-07-25  2:24       ` Michel Dänzer
  2014-07-25  3:05         ` Alex Deucher
  0 siblings, 1 reply; 9+ messages in thread
From: Michel Dänzer @ 2014-07-25  2:24 UTC (permalink / raw)
  To: Alex Deucher; +Cc: dri-devel

On 25.07.2014 11:06, Michel Dänzer wrote:
> On 25.07.2014 11:05, Michel Dänzer wrote:
>> On 25.07.2014 08:51, Alex Deucher wrote:
>>> We need to make sure we have a new enough firmware with
>>> the fixed nop packet.
>>>
>>> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
>>> ---
>>>  drivers/gpu/drm/radeon/radeon_kms.c | 6 ++++++
>>>  include/uapi/drm/radeon_drm.h       | 1 +
>>>  2 files changed, 7 insertions(+)
>>>
>>> diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
>>> index 35d9318..3ea9f59 100644
>>> --- a/drivers/gpu/drm/radeon/radeon_kms.c
>>> +++ b/drivers/gpu/drm/radeon/radeon_kms.c
>>> @@ -529,6 +529,12 @@ static int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file
>>>  		else
>>>  			*value = 1;
>>>  		break;
>>> +	case RADEON_INFO_HAWAII_ACCEL:
>>> +		if (rdev->new_fw)
>>> +			*value = 1;
>>> +		else
>>> +			*value = 0;
>>> +		break;
>>>  	default:
>>>  		DRM_DEBUG_KMS("Invalid request %d\n", info->request);
>>>  		return -EINVAL;
>>> diff --git a/include/uapi/drm/radeon_drm.h b/include/uapi/drm/radeon_drm.h
>>> index 509b2d7..a41dec3 100644
>>> --- a/include/uapi/drm/radeon_drm.h
>>> +++ b/include/uapi/drm/radeon_drm.h
>>> @@ -1010,6 +1010,7 @@ struct drm_radeon_cs {
>>>  #define RADEON_INFO_VRAM_USAGE		0x1e
>>>  #define RADEON_INFO_GTT_USAGE		0x1f
>>>  #define RADEON_INFO_ACTIVE_CU_COUNT	0x20
>>> +#define RADEON_INFO_HAWAII_ACCEL	0x21
>>>  
>>>  struct drm_radeon_info {
>>>  	uint32_t		request;
>>>
>>
>> Please make the RADEON_INFO_ACCEL_WORKING(2) ioctl do the right thing
>> for Hawaii instead of adding yet another one.
> 
> Ugh, s/ioctl/info query/ of course.

Hmm, I guess that doesn't work because older kernels returned 1 for
those on Hawaii...


-- 
Earthling Michel Dänzer            |                  http://www.amd.com
Libre software enthusiast          |                Mesa and X developer

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] drm/radeon: add new info ioctl query for hawaii accel
  2014-07-25  2:24       ` Michel Dänzer
@ 2014-07-25  3:05         ` Alex Deucher
  2014-07-25  9:30           ` Christian König
  0 siblings, 1 reply; 9+ messages in thread
From: Alex Deucher @ 2014-07-25  3:05 UTC (permalink / raw)
  To: Michel Dänzer; +Cc: Maling list - DRI developers

On Thu, Jul 24, 2014 at 10:24 PM, Michel Dänzer <michel@daenzer.net> wrote:
> On 25.07.2014 11:06, Michel Dänzer wrote:
>> On 25.07.2014 11:05, Michel Dänzer wrote:
>>> On 25.07.2014 08:51, Alex Deucher wrote:
>>>> We need to make sure we have a new enough firmware with
>>>> the fixed nop packet.
>>>>
>>>> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
>>>> ---
>>>>  drivers/gpu/drm/radeon/radeon_kms.c | 6 ++++++
>>>>  include/uapi/drm/radeon_drm.h       | 1 +
>>>>  2 files changed, 7 insertions(+)
>>>>
>>>> diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
>>>> index 35d9318..3ea9f59 100644
>>>> --- a/drivers/gpu/drm/radeon/radeon_kms.c
>>>> +++ b/drivers/gpu/drm/radeon/radeon_kms.c
>>>> @@ -529,6 +529,12 @@ static int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file
>>>>             else
>>>>                     *value = 1;
>>>>             break;
>>>> +   case RADEON_INFO_HAWAII_ACCEL:
>>>> +           if (rdev->new_fw)
>>>> +                   *value = 1;
>>>> +           else
>>>> +                   *value = 0;
>>>> +           break;
>>>>     default:
>>>>             DRM_DEBUG_KMS("Invalid request %d\n", info->request);
>>>>             return -EINVAL;
>>>> diff --git a/include/uapi/drm/radeon_drm.h b/include/uapi/drm/radeon_drm.h
>>>> index 509b2d7..a41dec3 100644
>>>> --- a/include/uapi/drm/radeon_drm.h
>>>> +++ b/include/uapi/drm/radeon_drm.h
>>>> @@ -1010,6 +1010,7 @@ struct drm_radeon_cs {
>>>>  #define RADEON_INFO_VRAM_USAGE             0x1e
>>>>  #define RADEON_INFO_GTT_USAGE              0x1f
>>>>  #define RADEON_INFO_ACTIVE_CU_COUNT        0x20
>>>> +#define RADEON_INFO_HAWAII_ACCEL   0x21
>>>>
>>>>  struct drm_radeon_info {
>>>>     uint32_t                request;
>>>>
>>>
>>> Please make the RADEON_INFO_ACCEL_WORKING(2) ioctl do the right thing
>>> for Hawaii instead of adding yet another one.
>>
>> Ugh, s/ioctl/info query/ of course.
>
> Hmm, I guess that doesn't work because older kernels returned 1 for
> those on Hawaii...

Right.  The hawaii problems came down to two things:

1. missing tiling info setup (fixed with Jerome's patch:
http://cgit.freedesktop.org/~agd5f/linux/commit/?h=drm-next-3.17-wip&id=78e758aa27d9d430c61999160ddf72e829c5cf26)
for hawaii.  This was due to merging hawaii support after we fixed up
CI tiling.  Dave already merged this and it should show up in stable.

2. The current Hawaii CP firmware doesn't support the special case
0xffff1000 type 3 NOP packet.  The newer firmware version I added
support for in 3.17 supports this packet.

So we can either patch mesa to use the type 2 packets for now and
allow it to work with kernels with older firmware.  The problem is the
compute rings don't support type 2 packets anymore and they are
deprecated on gfx, plus we'd still have to deal with existing versions
of mesa that still use the problematic packet.

It just seemed easier to add a new kernel check.

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] drm/radeon: add new info ioctl query for hawaii accel
  2014-07-25  3:05         ` Alex Deucher
@ 2014-07-25  9:30           ` Christian König
  2014-07-25 14:14             ` Jerome Glisse
  0 siblings, 1 reply; 9+ messages in thread
From: Christian König @ 2014-07-25  9:30 UTC (permalink / raw)
  To: Alex Deucher, Michel Dänzer; +Cc: Maling list - DRI developers

Am 25.07.2014 um 05:05 schrieb Alex Deucher:
> On Thu, Jul 24, 2014 at 10:24 PM, Michel Dänzer <michel@daenzer.net> wrote:
>> On 25.07.2014 11:06, Michel Dänzer wrote:
>>> On 25.07.2014 11:05, Michel Dänzer wrote:
>>>> On 25.07.2014 08:51, Alex Deucher wrote:
>>>>> We need to make sure we have a new enough firmware with
>>>>> the fixed nop packet.
>>>>>
>>>>> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
>>>>> ---
>>>>>   drivers/gpu/drm/radeon/radeon_kms.c | 6 ++++++
>>>>>   include/uapi/drm/radeon_drm.h       | 1 +
>>>>>   2 files changed, 7 insertions(+)
>>>>>
>>>>> diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
>>>>> index 35d9318..3ea9f59 100644
>>>>> --- a/drivers/gpu/drm/radeon/radeon_kms.c
>>>>> +++ b/drivers/gpu/drm/radeon/radeon_kms.c
>>>>> @@ -529,6 +529,12 @@ static int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file
>>>>>              else
>>>>>                      *value = 1;
>>>>>              break;
>>>>> +   case RADEON_INFO_HAWAII_ACCEL:
>>>>> +           if (rdev->new_fw)
>>>>> +                   *value = 1;
>>>>> +           else
>>>>> +                   *value = 0;
>>>>> +           break;
>>>>>      default:
>>>>>              DRM_DEBUG_KMS("Invalid request %d\n", info->request);
>>>>>              return -EINVAL;
>>>>> diff --git a/include/uapi/drm/radeon_drm.h b/include/uapi/drm/radeon_drm.h
>>>>> index 509b2d7..a41dec3 100644
>>>>> --- a/include/uapi/drm/radeon_drm.h
>>>>> +++ b/include/uapi/drm/radeon_drm.h
>>>>> @@ -1010,6 +1010,7 @@ struct drm_radeon_cs {
>>>>>   #define RADEON_INFO_VRAM_USAGE             0x1e
>>>>>   #define RADEON_INFO_GTT_USAGE              0x1f
>>>>>   #define RADEON_INFO_ACTIVE_CU_COUNT        0x20
>>>>> +#define RADEON_INFO_HAWAII_ACCEL   0x21
>>>>>
>>>>>   struct drm_radeon_info {
>>>>>      uint32_t                request;
>>>>>
>>>> Please make the RADEON_INFO_ACCEL_WORKING(2) ioctl do the right thing
>>>> for Hawaii instead of adding yet another one.
>>> Ugh, s/ioctl/info query/ of course.
>> Hmm, I guess that doesn't work because older kernels returned 1 for
>> those on Hawaii...
> Right.  The hawaii problems came down to two things:
>
> 1. missing tiling info setup (fixed with Jerome's patch:
> http://cgit.freedesktop.org/~agd5f/linux/commit/?h=drm-next-3.17-wip&id=78e758aa27d9d430c61999160ddf72e829c5cf26)
> for hawaii.  This was due to merging hawaii support after we fixed up
> CI tiling.  Dave already merged this and it should show up in stable.
>
> 2. The current Hawaii CP firmware doesn't support the special case
> 0xffff1000 type 3 NOP packet.  The newer firmware version I added
> support for in 3.17 supports this packet.
>
> So we can either patch mesa to use the type 2 packets for now and
> allow it to work with kernels with older firmware.  The problem is the
> compute rings don't support type 2 packets anymore and they are
> deprecated on gfx, plus we'd still have to deal with existing versions
> of mesa that still use the problematic packet.
>
> It just seemed easier to add a new kernel check.

Can we still make the check a bit more generic? E.g. not so HAWAII 
specific name and maybe returning more information from the new firmware 
header?

Something like this,
Christian.

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

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] drm/radeon: add new info ioctl query for hawaii accel
  2014-07-25  9:30           ` Christian König
@ 2014-07-25 14:14             ` Jerome Glisse
  2014-07-27  7:35               ` Dave Airlie
  0 siblings, 1 reply; 9+ messages in thread
From: Jerome Glisse @ 2014-07-25 14:14 UTC (permalink / raw)
  To: Christian König; +Cc: Michel Dänzer, Maling list - DRI developers

On Fri, Jul 25, 2014 at 11:30:55AM +0200, Christian König wrote:
> Am 25.07.2014 um 05:05 schrieb Alex Deucher:
> >On Thu, Jul 24, 2014 at 10:24 PM, Michel Dänzer <michel@daenzer.net> wrote:
> >>On 25.07.2014 11:06, Michel Dänzer wrote:
> >>>On 25.07.2014 11:05, Michel Dänzer wrote:
> >>>>On 25.07.2014 08:51, Alex Deucher wrote:
> >>>>>We need to make sure we have a new enough firmware with
> >>>>>the fixed nop packet.
> >>>>>
> >>>>>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> >>>>>---
> >>>>>  drivers/gpu/drm/radeon/radeon_kms.c | 6 ++++++
> >>>>>  include/uapi/drm/radeon_drm.h       | 1 +
> >>>>>  2 files changed, 7 insertions(+)
> >>>>>
> >>>>>diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
> >>>>>index 35d9318..3ea9f59 100644
> >>>>>--- a/drivers/gpu/drm/radeon/radeon_kms.c
> >>>>>+++ b/drivers/gpu/drm/radeon/radeon_kms.c
> >>>>>@@ -529,6 +529,12 @@ static int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file
> >>>>>             else
> >>>>>                     *value = 1;
> >>>>>             break;
> >>>>>+   case RADEON_INFO_HAWAII_ACCEL:
> >>>>>+           if (rdev->new_fw)
> >>>>>+                   *value = 1;
> >>>>>+           else
> >>>>>+                   *value = 0;
> >>>>>+           break;
> >>>>>     default:
> >>>>>             DRM_DEBUG_KMS("Invalid request %d\n", info->request);
> >>>>>             return -EINVAL;
> >>>>>diff --git a/include/uapi/drm/radeon_drm.h b/include/uapi/drm/radeon_drm.h
> >>>>>index 509b2d7..a41dec3 100644
> >>>>>--- a/include/uapi/drm/radeon_drm.h
> >>>>>+++ b/include/uapi/drm/radeon_drm.h
> >>>>>@@ -1010,6 +1010,7 @@ struct drm_radeon_cs {
> >>>>>  #define RADEON_INFO_VRAM_USAGE             0x1e
> >>>>>  #define RADEON_INFO_GTT_USAGE              0x1f
> >>>>>  #define RADEON_INFO_ACTIVE_CU_COUNT        0x20
> >>>>>+#define RADEON_INFO_HAWAII_ACCEL   0x21
> >>>>>
> >>>>>  struct drm_radeon_info {
> >>>>>     uint32_t                request;
> >>>>>
> >>>>Please make the RADEON_INFO_ACCEL_WORKING(2) ioctl do the right thing
> >>>>for Hawaii instead of adding yet another one.
> >>>Ugh, s/ioctl/info query/ of course.
> >>Hmm, I guess that doesn't work because older kernels returned 1 for
> >>those on Hawaii...
> >Right.  The hawaii problems came down to two things:
> >
> >1. missing tiling info setup (fixed with Jerome's patch:
> >http://cgit.freedesktop.org/~agd5f/linux/commit/?h=drm-next-3.17-wip&id=78e758aa27d9d430c61999160ddf72e829c5cf26)
> >for hawaii.  This was due to merging hawaii support after we fixed up
> >CI tiling.  Dave already merged this and it should show up in stable.
> >
> >2. The current Hawaii CP firmware doesn't support the special case
> >0xffff1000 type 3 NOP packet.  The newer firmware version I added
> >support for in 3.17 supports this packet.
> >
> >So we can either patch mesa to use the type 2 packets for now and
> >allow it to work with kernels with older firmware.  The problem is the
> >compute rings don't support type 2 packets anymore and they are
> >deprecated on gfx, plus we'd still have to deal with existing versions
> >of mesa that still use the problematic packet.
> >
> >It just seemed easier to add a new kernel check.
> 
> Can we still make the check a bit more generic? E.g. not so HAWAII specific
> name and maybe returning more information from the new firmware header?
> 
> Something like this,
> Christian.

I would rather not add anything, let just dump drm version in 3.17 and use
that to enable compute and in mean time disable compute for hawaii but enable
gfx if we detect 3.16. This would be a lot cleaner and no need for yet another
get_info ie we make 3.17 only report accel if new firmware is detected.

Cheers,
Jérôme

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] drm/radeon: add new info ioctl query for hawaii accel
  2014-07-25 14:14             ` Jerome Glisse
@ 2014-07-27  7:35               ` Dave Airlie
  0 siblings, 0 replies; 9+ messages in thread
From: Dave Airlie @ 2014-07-27  7:35 UTC (permalink / raw)
  To: Jerome Glisse; +Cc: Michel Dänzer, Maling list - DRI developers

Can't we just make the accel2 info return 2 instead of 1? and have
userspace know the difference.

be careful to make userspace work so we can return 3 in future.
Dave.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-07-27  7:35 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-24 23:51 [PATCH 1/2] drm/radeon: fix cut and paste issue for hawaii Alex Deucher
2014-07-24 23:51 ` [PATCH 2/2] drm/radeon: add new info ioctl query for hawaii accel Alex Deucher
2014-07-25  2:05   ` Michel Dänzer
2014-07-25  2:06     ` Michel Dänzer
2014-07-25  2:24       ` Michel Dänzer
2014-07-25  3:05         ` Alex Deucher
2014-07-25  9:30           ` Christian König
2014-07-25 14:14             ` Jerome Glisse
2014-07-27  7:35               ` Dave Airlie

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.