mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 03:44:45 +01:00
drm/{i915, xe}: pass struct drm_device instead of drm_device to ->alloc_obj
The initial plane parent interface ->alloc_obj hook no longer needs the crtc for anything. Pass struct drm_device instead. Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patch.msgid.link/7a40381be6d98dc0916a5447be5dd6cba86cfd0a.1765812266.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
parent
5bad00377e
commit
82eaf3459d
4 changed files with 8 additions and 13 deletions
|
|
@ -47,10 +47,9 @@ intel_reuse_initial_plane_obj(struct intel_crtc *this,
|
|||
}
|
||||
|
||||
static struct drm_gem_object *
|
||||
intel_alloc_initial_plane_obj(struct intel_crtc *crtc,
|
||||
intel_alloc_initial_plane_obj(struct intel_display *display,
|
||||
struct intel_initial_plane_config *plane_config)
|
||||
{
|
||||
struct intel_display *display = to_intel_display(crtc);
|
||||
struct intel_framebuffer *fb = plane_config->fb;
|
||||
|
||||
switch (fb->base.modifier) {
|
||||
|
|
@ -65,7 +64,7 @@ intel_alloc_initial_plane_obj(struct intel_crtc *crtc,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
return display->parent->initial_plane->alloc_obj(&crtc->base, plane_config);
|
||||
return display->parent->initial_plane->alloc_obj(display->drm, plane_config);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -88,7 +87,7 @@ intel_find_initial_plane_obj(struct intel_crtc *crtc,
|
|||
if (!plane_config->fb)
|
||||
return;
|
||||
|
||||
if (intel_alloc_initial_plane_obj(crtc, plane_config)) {
|
||||
if (intel_alloc_initial_plane_obj(display, plane_config)) {
|
||||
fb = &plane_config->fb->base;
|
||||
vma = plane_config->vma;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -228,11 +228,10 @@ err_obj:
|
|||
}
|
||||
|
||||
static struct drm_gem_object *
|
||||
i915_alloc_initial_plane_obj(struct drm_crtc *_crtc,
|
||||
i915_alloc_initial_plane_obj(struct drm_device *drm,
|
||||
struct intel_initial_plane_config *plane_config)
|
||||
{
|
||||
struct intel_crtc *crtc = to_intel_crtc(_crtc);
|
||||
struct intel_display *display = to_intel_display(crtc);
|
||||
struct intel_display *display = to_intel_display(drm);
|
||||
struct drm_mode_fb_cmd2 mode_cmd = {};
|
||||
struct drm_framebuffer *fb = &plane_config->fb->base;
|
||||
struct i915_vma *vma;
|
||||
|
|
|
|||
|
|
@ -14,8 +14,6 @@
|
|||
|
||||
#include "i915_vma.h"
|
||||
#include "intel_crtc.h"
|
||||
#include "intel_display.h"
|
||||
#include "intel_display_core.h"
|
||||
#include "intel_display_regs.h"
|
||||
#include "intel_display_types.h"
|
||||
#include "intel_fb.h"
|
||||
|
|
@ -122,11 +120,10 @@ initial_plane_bo(struct xe_device *xe,
|
|||
}
|
||||
|
||||
static struct drm_gem_object *
|
||||
xe_alloc_initial_plane_obj(struct drm_crtc *_crtc,
|
||||
xe_alloc_initial_plane_obj(struct drm_device *drm,
|
||||
struct intel_initial_plane_config *plane_config)
|
||||
{
|
||||
struct intel_crtc *crtc = to_intel_crtc(_crtc);
|
||||
struct xe_device *xe = to_xe_device(crtc->base.dev);
|
||||
struct xe_device *xe = to_xe_device(drm);
|
||||
struct drm_mode_fb_cmd2 mode_cmd = { 0 };
|
||||
struct drm_framebuffer *fb = &plane_config->fb->base;
|
||||
struct xe_bo *bo;
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ struct intel_display_hdcp_interface {
|
|||
|
||||
struct intel_display_initial_plane_interface {
|
||||
void (*vblank_wait)(struct drm_crtc *crtc);
|
||||
struct drm_gem_object *(*alloc_obj)(struct drm_crtc *crtc, struct intel_initial_plane_config *plane_config);
|
||||
struct drm_gem_object *(*alloc_obj)(struct drm_device *drm, struct intel_initial_plane_config *plane_config);
|
||||
int (*setup)(struct drm_plane_state *plane_state, struct intel_initial_plane_config *plane_config,
|
||||
struct drm_framebuffer *fb, struct i915_vma *vma);
|
||||
void (*config_fini)(struct intel_initial_plane_config *plane_configs);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue