[Intel-gfx] [PATCH 15/40] drm/i915: Priority boost for new clients
Tvrtko Ursulin
tvrtko.ursulin at linux.intel.com
Tue Sep 25 08:57:11 UTC 2018
On 25/09/2018 09:26, Chris Wilson wrote:
> Quoting Chris Wilson (2018-09-25 09:01:06)
>> Quoting Tvrtko Ursulin (2018-09-24 11:29:52)
>>>
>>> On 19/09/2018 20:55, Chris Wilson wrote:
>>>> diff --git a/drivers/gpu/drm/i915/i915_scheduler.h b/drivers/gpu/drm/i915/i915_scheduler.h
>>>> index 7edfad0abfd7..93e43e263d8c 100644
>>>> --- a/drivers/gpu/drm/i915/i915_scheduler.h
>>>> +++ b/drivers/gpu/drm/i915/i915_scheduler.h
>>>> @@ -19,12 +19,14 @@ enum {
>>>> I915_PRIORITY_INVALID = INT_MIN
>>>> };
>>>>
>>>> -#define I915_USER_PRIORITY_SHIFT 0
>>>> +#define I915_USER_PRIORITY_SHIFT 1
>>>> #define I915_USER_PRIORITY(x) ((x) << I915_USER_PRIORITY_SHIFT)
>>>>
>>>> #define I915_PRIORITY_COUNT BIT(I915_USER_PRIORITY_SHIFT)
>>>> #define I915_PRIORITY_MASK (-I915_PRIORITY_COUNT)
>>>>
>>>> +#define I915_PRIORITY_NEWCLIENT ((u8)BIT(0))
>>>
>>> Is the cast important and why?
>>
>> Unreliable memory says there was something iffy about the code generation
>> at one point.
>
> drivers/gpu/drm/i915/intel_lrc.c: In function ‘__unwind_incomplete_requests’:
> drivers/gpu/drm/i915/intel_lrc.c:272:13: error: overflow in conversion from ‘long unsigned int’ to ‘int’ changes value from ‘18446744071562067969’ to ‘-2147483647’ [-Werror=overflow]
> int prio = I915_PRIORITY_INVALID | I915_PRIORITY_NEWCLIENT;
So correct cast would be (int)BIT(..), or maybe not use BIT for less
confusion?
Regards,
Tvrtko
More information about the Intel-gfx
mailing list