Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

+8 -13
+3 -4
drivers/gpu/drm/i915/display/intel_initial_plane.c
··· 47 47 } 48 48 49 49 static struct drm_gem_object * 50 - intel_alloc_initial_plane_obj(struct intel_crtc *crtc, 50 + intel_alloc_initial_plane_obj(struct intel_display *display, 51 51 struct intel_initial_plane_config *plane_config) 52 52 { 53 - struct intel_display *display = to_intel_display(crtc); 54 53 struct intel_framebuffer *fb = plane_config->fb; 55 54 56 55 switch (fb->base.modifier) { ··· 64 65 return NULL; 65 66 } 66 67 67 - return display->parent->initial_plane->alloc_obj(&crtc->base, plane_config); 68 + return display->parent->initial_plane->alloc_obj(display->drm, plane_config); 68 69 } 69 70 70 71 static void ··· 87 88 if (!plane_config->fb) 88 89 return; 89 90 90 - if (intel_alloc_initial_plane_obj(crtc, plane_config)) { 91 + if (intel_alloc_initial_plane_obj(display, plane_config)) { 91 92 fb = &plane_config->fb->base; 92 93 vma = plane_config->vma; 93 94 } else {
+2 -3
drivers/gpu/drm/i915/i915_initial_plane.c
··· 228 228 } 229 229 230 230 static struct drm_gem_object * 231 - i915_alloc_initial_plane_obj(struct drm_crtc *_crtc, 231 + i915_alloc_initial_plane_obj(struct drm_device *drm, 232 232 struct intel_initial_plane_config *plane_config) 233 233 { 234 - struct intel_crtc *crtc = to_intel_crtc(_crtc); 235 - struct intel_display *display = to_intel_display(crtc); 234 + struct intel_display *display = to_intel_display(drm); 236 235 struct drm_mode_fb_cmd2 mode_cmd = {}; 237 236 struct drm_framebuffer *fb = &plane_config->fb->base; 238 237 struct i915_vma *vma;
+2 -5
drivers/gpu/drm/xe/display/xe_initial_plane.c
··· 14 14 15 15 #include "i915_vma.h" 16 16 #include "intel_crtc.h" 17 - #include "intel_display.h" 18 - #include "intel_display_core.h" 19 17 #include "intel_display_regs.h" 20 18 #include "intel_display_types.h" 21 19 #include "intel_fb.h" ··· 120 122 } 121 123 122 124 static struct drm_gem_object * 123 - xe_alloc_initial_plane_obj(struct drm_crtc *_crtc, 125 + xe_alloc_initial_plane_obj(struct drm_device *drm, 124 126 struct intel_initial_plane_config *plane_config) 125 127 { 126 - struct intel_crtc *crtc = to_intel_crtc(_crtc); 127 - struct xe_device *xe = to_xe_device(crtc->base.dev); 128 + struct xe_device *xe = to_xe_device(drm); 128 129 struct drm_mode_fb_cmd2 mode_cmd = { 0 }; 129 130 struct drm_framebuffer *fb = &plane_config->fb->base; 130 131 struct xe_bo *bo;
+1 -1
include/drm/intel/display_parent_interface.h
··· 33 33 34 34 struct intel_display_initial_plane_interface { 35 35 void (*vblank_wait)(struct drm_crtc *crtc); 36 - struct drm_gem_object *(*alloc_obj)(struct drm_crtc *crtc, struct intel_initial_plane_config *plane_config); 36 + struct drm_gem_object *(*alloc_obj)(struct drm_device *drm, struct intel_initial_plane_config *plane_config); 37 37 int (*setup)(struct drm_plane_state *plane_state, struct intel_initial_plane_config *plane_config, 38 38 struct drm_framebuffer *fb, struct i915_vma *vma); 39 39 void (*config_fini)(struct intel_initial_plane_config *plane_configs);