diff options
author | Dave Airlie <airlied@redhat.com> | 2018-09-27 19:37:51 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2018-09-27 19:37:55 -0400 |
commit | db9825c95498280718c4687fcf712016f5b6f5f6 (patch) | |
tree | 01661a811bcd16a7b6f3ee9790e77da75fd178b0 /drivers/gpu/drm/i915/i915_gem_context.h | |
parent | 156e60bc71aa31a3b42b1d66a822c2999bd0994c (diff) | |
parent | 448626103dad54ec5d06722e955586b5d557625d (diff) |
Merge tag 'drm-intel-next-2018-09-21' of git://anongit.freedesktop.org/drm/drm-intel into drm-next
Driver Changes:
- Bugzilla 107600: Fix stuttering video playback on MythTV on old hardware (Chris)
- Avoid black screen when using CSC coefficient matrix (Raviraj)
- Hammer PDs on Baytrail to make sure they reload (Chris)
- Capture some objects if unable to capture all, on error (Chris)
- Add W/A for 16 GB DIMMs on SKL+ (Mahesh)
- Only enable IPC for symmetric memory configurations on KBL+ (Mahesh)
- Assume pipe A to have maximum stride limits (Ville)
- Always update update OA contexts via context image (Tvrtko)
- Icelake enabling patches (Madhav, Dhinakaran)
- Add Icelake DMC firmware (Anusha)
- Fixes for CI found corner cases (Chris)
- Limit the backpressure for request allocation (Chris)
- Park GPU on module load so usage starts from known state (Chris)
- Flush tasklet when checking for idle (Chris)
- Use coherent write into the context image on BSW+ (Chris)
- Fix possible integer overflow for framebuffers that get aligned past 4GiB (Ville)
- Downgrade fence timeout from warn to notice and add debug hint (Chris)
- Fixes to multi function encoder code (Ville)
- Fix sprite plane check logic (Dan, Ville)
- PAGE_SIZE vs. I915_GTT_PAGE_SIZE fixes (Ville)
- Decode memory bandwidth and parameters for BXT and SKL+ (Mahesh)
- Overwrite BIOS set IPC value from KMS (Mahesh)
- Multiple pipe handling code cleanups/restructurings/optimizations (Ville)
- Spare low 4G address for non-48bit objects (Chris)
- Free context_setparam of struct_mutex (Chris)
- Delay updating ring register state on resume (Chris)
- Avoid unnecessarily copying overlay IOCTL parameters (Chris)
- Update GuC power domain states even without submission (Michal)
- Restore GuC preempt-context across S3/S4 (Chris)
- Add kernel selftest for rapid context switching (Chris)
- Keep runtime power management ref for live selftests (Chris)
- GEM code cleanups (Matt)
Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180927095933.GA11458@jlahtine-desk.ger.corp.intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_context.h')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem_context.h | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_context.h b/drivers/gpu/drm/i915/i915_gem_context.h index e09673ca731d..08165f6a0a84 100644 --- a/drivers/gpu/drm/i915/i915_gem_context.h +++ b/drivers/gpu/drm/i915/i915_gem_context.h | |||
@@ -117,15 +117,20 @@ struct i915_gem_context { | |||
117 | struct rcu_head rcu; | 117 | struct rcu_head rcu; |
118 | 118 | ||
119 | /** | 119 | /** |
120 | * @user_flags: small set of booleans controlled by the user | ||
121 | */ | ||
122 | unsigned long user_flags; | ||
123 | #define UCONTEXT_NO_ZEROMAP 0 | ||
124 | #define UCONTEXT_NO_ERROR_CAPTURE 1 | ||
125 | #define UCONTEXT_BANNABLE 2 | ||
126 | |||
127 | /** | ||
120 | * @flags: small set of booleans | 128 | * @flags: small set of booleans |
121 | */ | 129 | */ |
122 | unsigned long flags; | 130 | unsigned long flags; |
123 | #define CONTEXT_NO_ZEROMAP BIT(0) | 131 | #define CONTEXT_BANNED 0 |
124 | #define CONTEXT_NO_ERROR_CAPTURE 1 | 132 | #define CONTEXT_CLOSED 1 |
125 | #define CONTEXT_CLOSED 2 | 133 | #define CONTEXT_FORCE_SINGLE_SUBMISSION 2 |
126 | #define CONTEXT_BANNABLE 3 | ||
127 | #define CONTEXT_BANNED 4 | ||
128 | #define CONTEXT_FORCE_SINGLE_SUBMISSION 5 | ||
129 | 134 | ||
130 | /** | 135 | /** |
131 | * @hw_id: - unique identifier for the context | 136 | * @hw_id: - unique identifier for the context |
@@ -209,37 +214,37 @@ static inline bool i915_gem_context_is_closed(const struct i915_gem_context *ctx | |||
209 | static inline void i915_gem_context_set_closed(struct i915_gem_context *ctx) | 214 | static inline void i915_gem_context_set_closed(struct i915_gem_context *ctx) |
210 | { | 215 | { |
211 | GEM_BUG_ON(i915_gem_context_is_closed(ctx)); | 216 | GEM_BUG_ON(i915_gem_context_is_closed(ctx)); |
212 | __set_bit(CONTEXT_CLOSED, &ctx->flags); | 217 | set_bit(CONTEXT_CLOSED, &ctx->flags); |
213 | } | 218 | } |
214 | 219 | ||
215 | static inline bool i915_gem_context_no_error_capture(const struct i915_gem_context *ctx) | 220 | static inline bool i915_gem_context_no_error_capture(const struct i915_gem_context *ctx) |
216 | { | 221 | { |
217 | return test_bit(CONTEXT_NO_ERROR_CAPTURE, &ctx->flags); | 222 | return test_bit(UCONTEXT_NO_ERROR_CAPTURE, &ctx->user_flags); |
218 | } | 223 | } |
219 | 224 | ||
220 | static inline void i915_gem_context_set_no_error_capture(struct i915_gem_context *ctx) | 225 | static inline void i915_gem_context_set_no_error_capture(struct i915_gem_context *ctx) |
221 | { | 226 | { |
222 | __set_bit(CONTEXT_NO_ERROR_CAPTURE, &ctx->flags); | 227 | set_bit(UCONTEXT_NO_ERROR_CAPTURE, &ctx->user_flags); |
223 | } | 228 | } |
224 | 229 | ||
225 | static inline void i915_gem_context_clear_no_error_capture(struct i915_gem_context *ctx) | 230 | static inline void i915_gem_context_clear_no_error_capture(struct i915_gem_context *ctx) |
226 | { | 231 | { |
227 | __clear_bit(CONTEXT_NO_ERROR_CAPTURE, &ctx->flags); | 232 | clear_bit(UCONTEXT_NO_ERROR_CAPTURE, &ctx->user_flags); |
228 | } | 233 | } |
229 | 234 | ||
230 | static inline bool i915_gem_context_is_bannable(const struct i915_gem_context *ctx) | 235 | static inline bool i915_gem_context_is_bannable(const struct i915_gem_context *ctx) |
231 | { | 236 | { |
232 | return test_bit(CONTEXT_BANNABLE, &ctx->flags); | 237 | return test_bit(UCONTEXT_BANNABLE, &ctx->user_flags); |
233 | } | 238 | } |
234 | 239 | ||
235 | static inline void i915_gem_context_set_bannable(struct i915_gem_context *ctx) | 240 | static inline void i915_gem_context_set_bannable(struct i915_gem_context *ctx) |
236 | { | 241 | { |
237 | __set_bit(CONTEXT_BANNABLE, &ctx->flags); | 242 | set_bit(UCONTEXT_BANNABLE, &ctx->user_flags); |
238 | } | 243 | } |
239 | 244 | ||
240 | static inline void i915_gem_context_clear_bannable(struct i915_gem_context *ctx) | 245 | static inline void i915_gem_context_clear_bannable(struct i915_gem_context *ctx) |
241 | { | 246 | { |
242 | __clear_bit(CONTEXT_BANNABLE, &ctx->flags); | 247 | clear_bit(UCONTEXT_BANNABLE, &ctx->user_flags); |
243 | } | 248 | } |
244 | 249 | ||
245 | static inline bool i915_gem_context_is_banned(const struct i915_gem_context *ctx) | 250 | static inline bool i915_gem_context_is_banned(const struct i915_gem_context *ctx) |
@@ -249,7 +254,7 @@ static inline bool i915_gem_context_is_banned(const struct i915_gem_context *ctx | |||
249 | 254 | ||
250 | static inline void i915_gem_context_set_banned(struct i915_gem_context *ctx) | 255 | static inline void i915_gem_context_set_banned(struct i915_gem_context *ctx) |
251 | { | 256 | { |
252 | __set_bit(CONTEXT_BANNED, &ctx->flags); | 257 | set_bit(CONTEXT_BANNED, &ctx->flags); |
253 | } | 258 | } |
254 | 259 | ||
255 | static inline bool i915_gem_context_force_single_submission(const struct i915_gem_context *ctx) | 260 | static inline bool i915_gem_context_force_single_submission(const struct i915_gem_context *ctx) |