drm/i915: Remove two sloppy inline functions from .h
authorJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Tue, 8 Nov 2016 07:11:48 +0000 (09:11 +0200)
committerJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Tue, 8 Nov 2016 10:36:35 +0000 (12:36 +0200)
Get rid of sloppy inline functions now that we don't have more users:

i915_gem_request_get_seqno
i915_gem_request_get_engine

v2:
- request->engine is always non-NULL (Chris)

Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/1478589108-3702-1-git-send-email-joonas.lahtinen@linux.intel.com
drivers/gpu/drm/i915/i915_debugfs.c
drivers/gpu/drm/i915/i915_gem_request.h
drivers/gpu/drm/i915/i915_gpu_error.c

index c9465fbff2dfd616a66acef533103510c3fa3f0f..b681d422883a5dbc200c420dcd1a4c5fe9b1db23 100644 (file)
@@ -547,11 +547,11 @@ static int i915_gem_pageflip_info(struct seq_file *m, void *data)
                                           pipe, plane);
                        }
                        if (work->flip_queued_req) {
-                               struct intel_engine_cs *engine = i915_gem_request_get_engine(work->flip_queued_req);
+                               struct intel_engine_cs *engine = work->flip_queued_req->engine;
 
                                seq_printf(m, "Flip queued on %s at seqno %x, next seqno %x [current breadcrumb %x], completed? %d\n",
                                           engine->name,
-                                          i915_gem_request_get_seqno(work->flip_queued_req),
+                                          work->flip_queued_req->global_seqno,
                                           atomic_read(&dev_priv->gt.global_timeline.next_seqno),
                                           intel_engine_get_seqno(engine),
                                           i915_gem_request_completed(work->flip_queued_req));
index 75f8360b3421b1e6477edd548b09563d693656c5..0f69fadf928fcd78bff1365ae0a8f6447f90c8df 100644 (file)
@@ -162,18 +162,6 @@ int i915_gem_request_add_to_client(struct drm_i915_gem_request *req,
                                   struct drm_file *file);
 void i915_gem_request_retire_upto(struct drm_i915_gem_request *req);
 
-static inline u32
-i915_gem_request_get_seqno(struct drm_i915_gem_request *req)
-{
-       return req ? req->global_seqno : 0;
-}
-
-static inline struct intel_engine_cs *
-i915_gem_request_get_engine(struct drm_i915_gem_request *req)
-{
-       return req ? req->engine : NULL;
-}
-
 static inline struct drm_i915_gem_request *
 to_request(struct dma_fence *fence)
 {
index 204093f3eaa5234f610636480cdbf8ec9922f5c3..0dc5d93eec6a1718d2f01520d29c82a94018a9ff 100644 (file)
@@ -861,16 +861,19 @@ out:
 static inline uint32_t
 __active_get_seqno(struct i915_gem_active *active)
 {
-       return i915_gem_request_get_seqno(__i915_gem_active_peek(active));
+       struct drm_i915_gem_request *request;
+
+       request = __i915_gem_active_peek(active);
+       return request ? request->global_seqno : 0;
 }
 
 static inline int
 __active_get_engine_id(struct i915_gem_active *active)
 {
-       struct intel_engine_cs *engine;
+       struct drm_i915_gem_request *request;
 
-       engine = i915_gem_request_get_engine(__i915_gem_active_peek(active));
-       return engine ? engine->id : -1;
+       request = __i915_gem_active_peek(active);
+       return request ? request->engine->id : -1;
 }
 
 static void capture_bo(struct drm_i915_error_buffer *err,