Re: [PATCH 15/40] drm/i915: Priority boost for new clients

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 25/09/2018 10:06, Chris Wilson wrote:
Quoting Tvrtko Ursulin (2018-09-25 09:57:11)

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?

It's a bit, I like them unsigned to avoid sign extension confusion most
of the time. (What am I saying, sign extension is already confusing and
no matter what you do, you always want the opposite.)

Okay, it's internal so no big deal either way.

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux