Skip to content

Commit 20561da

Browse files
committed
Revert "drm/i915/gem: Delete unused code"
These commits caused a regression on Lenovo t520 sandybridge machine belonging to reporter. We are reverting them for 5.10 for other reasons, so just do it for 5.9 as well. This reverts commit 7ac2d25. Reported-by: Harald Arnesen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
1 parent ad5d95e commit 20561da

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -965,6 +965,25 @@ static void reloc_cache_init(struct reloc_cache *cache,
965965
cache->target = NULL;
966966
}
967967

968+
static inline void *unmask_page(unsigned long p)
969+
{
970+
return (void *)(uintptr_t)(p & PAGE_MASK);
971+
}
972+
973+
static inline unsigned int unmask_flags(unsigned long p)
974+
{
975+
return p & ~PAGE_MASK;
976+
}
977+
978+
#define KMAP 0x4 /* after CLFLUSH_FLAGS */
979+
980+
static inline struct i915_ggtt *cache_to_ggtt(struct reloc_cache *cache)
981+
{
982+
struct drm_i915_private *i915 =
983+
container_of(cache, struct i915_execbuffer, reloc_cache)->i915;
984+
return &i915->ggtt;
985+
}
986+
968987
#define RELOC_TAIL 4
969988

970989
static int reloc_gpu_chain(struct reloc_cache *cache)

0 commit comments

Comments
 (0)