diff options
author | Matt Roper <matthew.d.roper@intel.com> | 2014-07-07 21:21:47 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-07-09 07:51:42 -0400 |
commit | 155e63696caab748da3f344f66de503038a72024 (patch) | |
tree | bcbd4d3ba759ff783c0a9e9255f9e41000d8019e /drivers | |
parent | 1f767e02d69f6a37a86aa94fd2c7e2528ae1161e (diff) |
drm/i915: Introduce intel_fb_obj() macro
Add an intel_fb_obj() macro that returns the GEM object associated with
a DRM framebuffer. This macro is safe to call on NULL framebuffers (a
NULL object pointer will be returned in this case).
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/i915/intel_drv.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 9da665a1cd31..41c83ea588f1 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h | |||
@@ -486,6 +486,7 @@ struct cxsr_latency { | |||
486 | #define to_intel_encoder(x) container_of(x, struct intel_encoder, base) | 486 | #define to_intel_encoder(x) container_of(x, struct intel_encoder, base) |
487 | #define to_intel_framebuffer(x) container_of(x, struct intel_framebuffer, base) | 487 | #define to_intel_framebuffer(x) container_of(x, struct intel_framebuffer, base) |
488 | #define to_intel_plane(x) container_of(x, struct intel_plane, base) | 488 | #define to_intel_plane(x) container_of(x, struct intel_plane, base) |
489 | #define intel_fb_obj(x) (x ? to_intel_framebuffer(x)->obj : NULL) | ||
489 | 490 | ||
490 | struct intel_hdmi { | 491 | struct intel_hdmi { |
491 | u32 hdmi_reg; | 492 | u32 hdmi_reg; |