Commit 6dfccb95 authored by Jani Nikula's avatar Jani Nikula
Browse files

drm/i915: extract intel_fbdev.h from intel_drv.h



It used to be handy that we only had a couple of headers, but over time
intel_drv.h has become unwieldy. Extract declarations to a separate
header file corresponding to the implementation module, clarifying the
modularity of the driver.

Ensure the new header is self-contained, and do so with minimal further
includes, using forward declarations as needed. Include the new header
only where needed, and sort the modified include directives while at it
and as needed.

No functional changes.

Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Acked-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/82d11bf634094f44a7469a096de3d3768314d6bc.1554461791.git.jani.nikula@intel.com
parent 696173b0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@ header_test := \
	intel_ddi.h \
	intel_engine_types.h \
	intel_fbc.h \
	intel_fbdev.h \
	intel_frontbuffer.h \
	intel_hdcp.h \
	intel_lspcon.h \
+1 −0
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@
#include "intel_audio.h"
#include "intel_csr.h"
#include "intel_drv.h"
#include "intel_fbdev.h"
#include "intel_pm.h"
#include "intel_uc.h"
#include "intel_workarounds.h"
+1 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@
#include "i915_drv.h"
#include "i915_globals.h"
#include "i915_selftest.h"
#include "intel_fbdev.h"

#define PLATFORM(x) .platform = (x)
#define GEN(x) .gen = (x), .gen_mask = BIT((x) - 1)
+1 −0
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@
#include "intel_drv.h"
#include "intel_dsi.h"
#include "intel_fbc.h"
#include "intel_fbdev.h"
#include "intel_frontbuffer.h"
#include "intel_hdcp.h"
#include "intel_pm.h"
+0 −40
Original line number Diff line number Diff line
@@ -1973,46 +1973,6 @@ void intel_hpd_poll_init(struct drm_i915_private *dev_priv);
bool intel_encoder_hotplug(struct intel_encoder *encoder,
			   struct intel_connector *connector);

/* legacy fbdev emulation in intel_fbdev.c */
#ifdef CONFIG_DRM_FBDEV_EMULATION
extern int intel_fbdev_init(struct drm_device *dev);
extern void intel_fbdev_initial_config_async(struct drm_device *dev);
extern void intel_fbdev_unregister(struct drm_i915_private *dev_priv);
extern void intel_fbdev_fini(struct drm_i915_private *dev_priv);
extern void intel_fbdev_set_suspend(struct drm_device *dev, int state, bool synchronous);
extern void intel_fbdev_output_poll_changed(struct drm_device *dev);
extern void intel_fbdev_restore_mode(struct drm_device *dev);
#else
static inline int intel_fbdev_init(struct drm_device *dev)
{
	return 0;
}

static inline void intel_fbdev_initial_config_async(struct drm_device *dev)
{
}

static inline void intel_fbdev_unregister(struct drm_i915_private *dev_priv)
{
}

static inline void intel_fbdev_fini(struct drm_i915_private *dev_priv)
{
}

static inline void intel_fbdev_set_suspend(struct drm_device *dev, int state, bool synchronous)
{
}

static inline void intel_fbdev_output_poll_changed(struct drm_device *dev)
{
}

static inline void intel_fbdev_restore_mode(struct drm_device *dev)
{
}
#endif

/* intel_hdmi.c */
void intel_hdmi_init(struct drm_i915_private *dev_priv, i915_reg_t hdmi_reg,
		     enum port port);
Loading