Skip to content

Commit 155e636

Browse files
mattropedanvet
authored andcommitted
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 <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
1 parent 1f767e0 commit 155e636

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/gpu/drm/i915/intel_drv.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,7 @@ struct cxsr_latency {
486486
#define to_intel_encoder(x) container_of(x, struct intel_encoder, base)
487487
#define to_intel_framebuffer(x) container_of(x, struct intel_framebuffer, base)
488488
#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)
489490

490491
struct intel_hdmi {
491492
u32 hdmi_reg;

0 commit comments

Comments
 (0)