Commit 9af06d09 authored by Jani Nikula's avatar Jani Nikula
Browse files

drm/i915/fb: hide the guts of intel_fb_obj()



Use a proper function in intel_fb.[ch] for intel_fb_obj() to be able to
drop the gem/i915_gem_object_types.h from intel_display_types.h.

Reviewed-by: default avatarLuca Coelho <luciano.coelho@intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/c5ff0d355911903809ba366403192243c05d3427.1724689818.git.jani.nikula@intel.com
parent ae19ba91
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@
#include "intel_atomic.h"
#include "intel_display.h"
#include "intel_display_trace.h"
#include "intel_fb.h"
#include "intel_mchbar_regs.h"
#include "intel_wm.h"
#include "skl_watermark.h"
+1 −0
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@
#include <drm/drm_blend.h>
#include <drm/drm_fourcc.h>

#include "gem/i915_gem_object_types.h"
#include "i915_config.h"
#include "i9xx_plane_regs.h"
#include "intel_atomic_plane.h"
+2 −1
Original line number Diff line number Diff line
@@ -16,8 +16,8 @@
#include "i915_reg.h"
#include "intel_alpm.h"
#include "intel_crtc.h"
#include "intel_de.h"
#include "intel_crtc_state_dump.h"
#include "intel_de.h"
#include "intel_display_debugfs.h"
#include "intel_display_debugfs_params.h"
#include "intel_display_power.h"
@@ -28,6 +28,7 @@
#include "intel_dp_link_training.h"
#include "intel_dp_mst.h"
#include "intel_drrs.h"
#include "intel_fb.h"
#include "intel_fbc.h"
#include "intel_fbdev.h"
#include "intel_hdcp.h"
+0 −3
Original line number Diff line number Diff line
@@ -44,7 +44,6 @@
#include <drm/drm_vblank_work.h>
#include <drm/intel/i915_hdcp_interface.h>

#include "gem/i915_gem_object_types.h" /* for to_intel_bo() */
#include "i915_vma.h"
#include "i915_vma_types.h"
#include "intel_bios.h"
@@ -1491,8 +1490,6 @@ struct intel_plane {
#define to_intel_framebuffer(fb) \
	container_of_const((fb), struct intel_framebuffer, base)

#define intel_fb_obj(x) ((x) ? to_intel_bo((x)->obj[0]) : NULL)

struct intel_hdmi {
	i915_reg_t hdmi_reg;
	struct {
+6 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@
#include <linux/dma-resv.h>

#include "gem/i915_gem_object.h"
#include "gem/i915_gem_object_types.h"
#include "i915_drv.h"
#include "intel_atomic_plane.h"
#include "intel_display.h"
@@ -2119,3 +2120,8 @@ intel_framebuffer_create(struct drm_i915_gem_object *obj,
	kfree(intel_fb);
	return ERR_PTR(ret);
}

struct drm_i915_gem_object *intel_fb_obj(const struct drm_framebuffer *fb)
{
	return fb ? to_intel_bo(fb->obj[0]) : NULL;
}
Loading