mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
drm/i915: Introduce intel_dumb_fb_max_stride()
Wrap intel_plane_fb_max_stride() in intel_dumb_fb_max_stride() for the purposes of dumb fb creation. I want to change intel_plane_fb_max_stride() to take a 'struct drm_format_info' instead of the 'u32 pixel_format' so we need an excplicit format info lookup in the dumb fb path and I don't really want to have that in i915_gem_dumb_create() directly. This makes intel_plane_fb_max_stride() internal to the display code again, and thus we can pass in struct intel_display instead of struct drm_device. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patch.msgid.link/20251107181126.5743-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
@@ -547,16 +547,12 @@ void intel_disable_transcoder(const struct intel_crtc_state *old_crtc_state)
|
||||
intel_wait_for_pipe_off(old_crtc_state);
|
||||
}
|
||||
|
||||
u32 intel_plane_fb_max_stride(struct drm_device *drm,
|
||||
u32 intel_plane_fb_max_stride(struct intel_display *display,
|
||||
u32 pixel_format, u64 modifier)
|
||||
{
|
||||
struct intel_display *display = to_intel_display(drm);
|
||||
struct intel_crtc *crtc;
|
||||
struct intel_plane *plane;
|
||||
|
||||
if (!HAS_DISPLAY(display))
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* We assume the primary plane for pipe A has
|
||||
* the highest stride limits of them all,
|
||||
@@ -572,6 +568,17 @@ u32 intel_plane_fb_max_stride(struct drm_device *drm,
|
||||
DRM_MODE_ROTATE_0);
|
||||
}
|
||||
|
||||
u32 intel_dumb_fb_max_stride(struct drm_device *drm,
|
||||
u32 pixel_format, u64 modifier)
|
||||
{
|
||||
struct intel_display *display = to_intel_display(drm);
|
||||
|
||||
if (!HAS_DISPLAY(display))
|
||||
return 0;
|
||||
|
||||
return intel_plane_fb_max_stride(display, pixel_format, modifier);
|
||||
}
|
||||
|
||||
void intel_set_plane_visible(struct intel_crtc_state *crtc_state,
|
||||
struct intel_plane_state *plane_state,
|
||||
bool visible)
|
||||
|
||||
Reference in New Issue
Block a user