Skip to content

Commit a268bcd

Browse files
committed
drm/i915: Move GEM BO inside drm_framebuffer
Since drm_framebuffer can now store GEM objects directly, place them there rather than in our own subclass. v2: Only hold a single reference per framebuffer, not per plane. (Ville) v3: Drop NULL check in intel_fb_obj. (Ville) Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> Cc: Jani Nikula <[email protected]> Cc: Joonas Lahtinen <[email protected]> Cc: Rodrigo Vivi <[email protected]> Cc: [email protected] Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent a5ff7a4 commit a268bcd

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

drivers/gpu/drm/i915/intel_display.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14370,9 +14370,9 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
1437014370
i, fb->pitches[i], stride_alignment);
1437114371
goto err;
1437214372
}
14373-
}
1437414373

14375-
intel_fb->obj = obj;
14374+
fb->obj[i] = &obj->base;
14375+
}
1437614376

1437714377
ret = intel_fill_fb_info(dev_priv, fb);
1437814378
if (ret)

drivers/gpu/drm/i915/intel_drv.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ enum intel_output_type {
194194

195195
struct intel_framebuffer {
196196
struct drm_framebuffer base;
197-
struct drm_i915_gem_object *obj;
198197
struct intel_rotation_info rot_info;
199198

200199
/* for each plane in the normal GTT view */
@@ -1005,7 +1004,7 @@ struct cxsr_latency {
10051004
#define to_intel_framebuffer(x) container_of(x, struct intel_framebuffer, base)
10061005
#define to_intel_plane(x) container_of(x, struct intel_plane, base)
10071006
#define to_intel_plane_state(x) container_of(x, struct intel_plane_state, base)
1008-
#define intel_fb_obj(x) (x ? to_intel_framebuffer(x)->obj : NULL)
1007+
#define intel_fb_obj(x) ((x) ? to_intel_bo((x)->obj[0]) : NULL)
10091008

10101009
struct intel_hdmi {
10111010
i915_reg_t hdmi_reg;

0 commit comments

Comments
 (0)