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: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/c5ff0d355911903809ba366403192243c05d3427.1724689818.git.jani.nikula@intel.com
This commit is contained in:
Jani Nikula 2024-08-26 19:31:19 +03:00
parent ae19ba915e
commit 9af06d0947
8 changed files with 14 additions and 4 deletions

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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 {

View File

@ -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;
}

View File

@ -96,4 +96,6 @@ bool intel_fb_uses_dpt(const struct drm_framebuffer *fb);
unsigned int intel_fb_modifier_to_tiling(u64 fb_modifier);
struct drm_i915_gem_object *intel_fb_obj(const struct drm_framebuffer *fb);
#endif /* __INTEL_FB_H__ */

View File

@ -45,6 +45,7 @@
#include "gem/i915_gem_mman.h"
#include "gem/i915_gem_object.h"
#include "gem/i915_gem_object_types.h"
#include "i915_drv.h"
#include "intel_display_types.h"

View File

@ -56,6 +56,7 @@
*/
#include "gem/i915_gem_object_frontbuffer.h"
#include "gem/i915_gem_object_types.h"
#include "i915_active.h"
#include "i915_drv.h"
#include "intel_display_trace.h"