mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 23:22:31 +02:00
drm/i915/fb: add intel_framebuffer_alloc()
Add intel_framebuffer_alloc() to hide intel_bo_alloc_framebuffer(), as that doesn't feel like the correct abstraction. Cc: Jocelyn Falempe <jfalempe@redhat.com> Cc: Maarten Lankhorst <dev@lankhorst.se> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com> Link: https://lore.kernel.org/r/379c306c692c50f6af3b6f2488c213f12627954f.1756835342.git.jani.nikula@intel.com
This commit is contained in:
parent
45b9545980
commit
cef2c7266f
|
|
@ -15,7 +15,6 @@
|
|||
#include "i9xx_plane.h"
|
||||
#include "i9xx_plane_regs.h"
|
||||
#include "intel_atomic.h"
|
||||
#include "intel_bo.h"
|
||||
#include "intel_de.h"
|
||||
#include "intel_display_irq.h"
|
||||
#include "intel_display_regs.h"
|
||||
|
|
@ -1178,7 +1177,7 @@ i9xx_get_initial_plane_config(struct intel_crtc *crtc,
|
|||
|
||||
drm_WARN_ON(display->drm, pipe != crtc->pipe);
|
||||
|
||||
intel_fb = intel_bo_alloc_framebuffer();
|
||||
intel_fb = intel_framebuffer_alloc();
|
||||
if (!intel_fb) {
|
||||
drm_dbg_kms(display->drm, "failed to alloc fb\n");
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -2340,6 +2340,11 @@ intel_user_framebuffer_create(struct drm_device *dev,
|
|||
return fb;
|
||||
}
|
||||
|
||||
struct intel_framebuffer *intel_framebuffer_alloc(void)
|
||||
{
|
||||
return intel_bo_alloc_framebuffer();
|
||||
}
|
||||
|
||||
struct drm_framebuffer *
|
||||
intel_framebuffer_create(struct drm_gem_object *obj,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd)
|
||||
|
|
@ -2347,7 +2352,7 @@ intel_framebuffer_create(struct drm_gem_object *obj,
|
|||
struct intel_framebuffer *intel_fb;
|
||||
int ret;
|
||||
|
||||
intel_fb = intel_bo_alloc_framebuffer();
|
||||
intel_fb = intel_framebuffer_alloc();
|
||||
if (!intel_fb)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
|
|
|
|||
|
|
@ -103,6 +103,9 @@ void intel_add_fb_offsets(int *x, int *y,
|
|||
int intel_framebuffer_init(struct intel_framebuffer *ifb,
|
||||
struct drm_gem_object *obj,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd);
|
||||
|
||||
struct intel_framebuffer *intel_framebuffer_alloc(void);
|
||||
|
||||
struct drm_framebuffer *
|
||||
intel_framebuffer_create(struct drm_gem_object *obj,
|
||||
struct drm_mode_fb_cmd2 *mode_cmd);
|
||||
|
|
|
|||
|
|
@ -3028,7 +3028,7 @@ skl_get_initial_plane_config(struct intel_crtc *crtc,
|
|||
return;
|
||||
}
|
||||
|
||||
intel_fb = intel_bo_alloc_framebuffer();
|
||||
intel_fb = intel_framebuffer_alloc();
|
||||
if (!intel_fb) {
|
||||
drm_dbg_kms(display->drm, "failed to alloc fb\n");
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user