mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
drm/i915: Remove 'mem' and 'phy_base' from struct intel_initial_plane_config
The 'mem' and 'phy_base' members of struct intel_initial_plane_config only exist to be passed from initial_plane_phys() to its sole caller. Just return them via function arguments. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patch.msgid.link/20260410150449.9699-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
parent
7f30fe4592
commit
1f258c2350
|
|
@ -756,8 +756,6 @@ struct intel_plane_state {
|
|||
|
||||
struct intel_initial_plane_config {
|
||||
struct intel_framebuffer *fb;
|
||||
struct intel_memory_region *mem;
|
||||
resource_size_t phys_base;
|
||||
struct i915_vma *vma;
|
||||
int size;
|
||||
u32 base;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,9 @@ initial_plane_memory_type(struct drm_i915_private *i915)
|
|||
|
||||
static bool
|
||||
initial_plane_phys(struct drm_i915_private *i915,
|
||||
struct intel_initial_plane_config *plane_config)
|
||||
struct intel_initial_plane_config *plane_config,
|
||||
resource_size_t *out_phys_base,
|
||||
struct intel_memory_region **out_mem)
|
||||
{
|
||||
struct i915_ggtt *ggtt = to_gt(i915)->ggtt;
|
||||
struct intel_memory_region *mem;
|
||||
|
|
@ -77,8 +79,8 @@ initial_plane_phys(struct drm_i915_private *i915,
|
|||
drm_dbg(&i915->drm, "Using dma_addr=%pa, based on initial plane programming\n",
|
||||
&dma_addr);
|
||||
|
||||
plane_config->phys_base = dma_addr - mem->region.start;
|
||||
plane_config->mem = mem;
|
||||
*out_phys_base = dma_addr - mem->region.start;
|
||||
*out_mem = mem;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -99,12 +101,9 @@ initial_plane_vma(struct drm_i915_private *i915,
|
|||
if (plane_config->size == 0)
|
||||
return NULL;
|
||||
|
||||
if (!initial_plane_phys(i915, plane_config))
|
||||
if (!initial_plane_phys(i915, plane_config, &phys_base, &mem))
|
||||
return NULL;
|
||||
|
||||
phys_base = plane_config->phys_base;
|
||||
mem = plane_config->mem;
|
||||
|
||||
base = round_down(plane_config->base, I915_GTT_MIN_ALIGNMENT);
|
||||
size = round_up(plane_config->base + plane_config->size,
|
||||
mem->min_page_size);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user