mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
drm/{i915, xe}/fbdev: drop drm device parameter from intel_fbdev_fb_fill_info()
The struct drm_device *drm parameter of intel_fbdev_fb_fill_info() is redundant, as you can obtain the same information via obj->dev. Drop the drm parameter, and move obj as first (or the context) parameter. Reviewed-by: Michał Grzelak <michal.grzelak@intel.com> Link: https://patch.msgid.link/6c617dc41c07b0e3e9af01b82d0d1dadbd4760fc.1774950508.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
parent
37b58ada0c
commit
b35b3148a7
|
|
@ -327,7 +327,7 @@ int intel_fbdev_driver_fbdev_probe(struct drm_fb_helper *helper,
|
|||
|
||||
obj = intel_fb_bo(&fb->base);
|
||||
|
||||
ret = intel_fbdev_fb_fill_info(display->drm, info, obj, vma);
|
||||
ret = intel_fbdev_fb_fill_info(obj, info, vma);
|
||||
if (ret)
|
||||
goto out_unpin;
|
||||
|
||||
|
|
|
|||
|
|
@ -66,10 +66,10 @@ void intel_fbdev_fb_bo_destroy(struct drm_gem_object *obj)
|
|||
drm_gem_object_put(obj);
|
||||
}
|
||||
|
||||
int intel_fbdev_fb_fill_info(struct drm_device *drm, struct fb_info *info,
|
||||
struct drm_gem_object *_obj, struct i915_vma *vma)
|
||||
int intel_fbdev_fb_fill_info(struct drm_gem_object *_obj, struct fb_info *info,
|
||||
struct i915_vma *vma)
|
||||
{
|
||||
struct drm_i915_private *i915 = to_i915(drm);
|
||||
struct drm_i915_private *i915 = to_i915(_obj->dev);
|
||||
struct drm_i915_gem_object *obj = to_intel_bo(_obj);
|
||||
struct i915_gem_ww_ctx ww;
|
||||
void __iomem *vaddr;
|
||||
|
|
@ -101,7 +101,7 @@ int intel_fbdev_fb_fill_info(struct drm_device *drm, struct fb_info *info,
|
|||
|
||||
vaddr = i915_vma_pin_iomap(vma);
|
||||
if (IS_ERR(vaddr)) {
|
||||
drm_err(drm,
|
||||
drm_err(&i915->drm,
|
||||
"Failed to remap framebuffer into virtual memory (%pe)\n", vaddr);
|
||||
ret = PTR_ERR(vaddr);
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ struct i915_vma;
|
|||
u32 intel_fbdev_fb_pitch_align(u32 stride);
|
||||
struct drm_gem_object *intel_fbdev_fb_bo_create(struct drm_device *drm, int size);
|
||||
void intel_fbdev_fb_bo_destroy(struct drm_gem_object *obj);
|
||||
int intel_fbdev_fb_fill_info(struct drm_device *drm, struct fb_info *info,
|
||||
struct drm_gem_object *obj, struct i915_vma *vma);
|
||||
int intel_fbdev_fb_fill_info(struct drm_gem_object *obj, struct fb_info *info,
|
||||
struct i915_vma *vma);
|
||||
bool intel_fbdev_fb_prefer_stolen(struct drm_device *drm, unsigned int size);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -91,11 +91,11 @@ void intel_fbdev_fb_bo_destroy(struct drm_gem_object *obj)
|
|||
xe_bo_unpin_map_no_vm(gem_to_xe_bo(obj));
|
||||
}
|
||||
|
||||
int intel_fbdev_fb_fill_info(struct drm_device *drm, struct fb_info *info,
|
||||
struct drm_gem_object *_obj, struct i915_vma *vma)
|
||||
int intel_fbdev_fb_fill_info(struct drm_gem_object *_obj, struct fb_info *info,
|
||||
struct i915_vma *vma)
|
||||
{
|
||||
struct xe_bo *obj = gem_to_xe_bo(_obj);
|
||||
struct pci_dev *pdev = to_pci_dev(drm->dev);
|
||||
struct pci_dev *pdev = to_pci_dev(_obj->dev->dev);
|
||||
|
||||
if (!(obj->flags & XE_BO_FLAG_SYSTEM)) {
|
||||
if (obj->flags & XE_BO_FLAG_STOLEN)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user