diff options
author | Imre Deak <imre.deak@intel.com> | 2021-03-25 23:48:01 +0200 |
---|---|---|
committer | Imre Deak <imre.deak@intel.com> | 2021-03-29 22:58:12 +0300 |
commit | ee456a4ca5adef31ffd86c0386d7ac7b367d6533 (patch) | |
tree | 66afb7d307d9ec19f2f922560a257f3a9aab7a96 /drivers/gpu/drm/i915/display/intel_fb.h | |
parent | 67cfab66139b60939ad3dac2da6619f4998fd192 (diff) |
drm/i915: Simplify copying the FB view state to the plane state
Instead of copying separately the GTT remapped and color plane view info
from the FB to the plane state, do this by copying the whole
intel_fb_view struct. For this we make sure the FB view state is fully
inited (that is also including the view type) already during FB
creation, so this init is not required during atomic check time. This
also means the we don't need to reset the unused color plane info during
atomic check, as these are already reset during FB creation.
I noticed that initial FBs will only work atm if they are page aligned
(which BIOS most probably always ensures), but add a comment to sanitize
this part once. Also we won't disable the plane if
get_initial_plane_config() failed for some reason (for instance due to
unsupported rotation), add a TODO: comment for this too.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210325214808.2071517-19-imre.deak@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_fb.h')
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_fb.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_fb.h b/drivers/gpu/drm/i915/display/intel_fb.h index bd1551c694eb..6acf792a8c44 100644 --- a/drivers/gpu/drm/i915/display/intel_fb.h +++ b/drivers/gpu/drm/i915/display/intel_fb.h @@ -12,8 +12,8 @@ struct drm_framebuffer; struct drm_i915_private; -struct i915_ggtt_view; - +struct intel_fb_view; +struct intel_framebuffer; struct intel_plane_state; bool is_ccs_plane(const struct drm_framebuffer *fb, int plane); @@ -46,11 +46,9 @@ u32 intel_plane_compute_aligned_offset(int *x, int *y, const struct intel_plane_state *state, int color_plane); -int intel_fb_pitch(const struct drm_framebuffer *fb, int color_plane, unsigned int rotation); - int intel_fill_fb_info(struct drm_i915_private *i915, struct drm_framebuffer *fb); -void intel_fill_fb_ggtt_view(struct i915_ggtt_view *view, const struct drm_framebuffer *fb, - unsigned int rotation); +void intel_fb_fill_view(const struct intel_framebuffer *fb, unsigned int rotation, + struct intel_fb_view *view); int intel_plane_compute_gtt(struct intel_plane_state *plane_state); #endif /* __INTEL_FB_H__ */ |