Commit b375d0ef authored by Jani Nikula's avatar Jani Nikula

drm/i915: extract intel_vdsc.h from intel_drv.h and i915_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>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/76d2719b462004ec6f6f5c302ee5d3876357c599.1556540890.git.jani.nikula@intel.com
parent 05ca9306
...@@ -50,6 +50,7 @@ header_test := \ ...@@ -50,6 +50,7 @@ header_test := \
intel_sprite.h \ intel_sprite.h \
intel_tv.h \ intel_tv.h \
intel_uncore.h \ intel_uncore.h \
intel_vdsc.h \
intel_wakeref.h intel_wakeref.h
quiet_cmd_header_test = HDRTEST $@ quiet_cmd_header_test = HDRTEST $@
......
...@@ -3313,9 +3313,6 @@ extern void intel_rps_mark_interactive(struct drm_i915_private *i915, ...@@ -3313,9 +3313,6 @@ extern void intel_rps_mark_interactive(struct drm_i915_private *i915,
bool interactive); bool interactive);
extern bool intel_set_memory_cxsr(struct drm_i915_private *dev_priv, extern bool intel_set_memory_cxsr(struct drm_i915_private *dev_priv,
bool enable); bool enable);
void intel_dsc_enable(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state);
void intel_dsc_disable(const struct intel_crtc_state *crtc_state);
int i915_reg_read_ioctl(struct drm_device *dev, void *data, int i915_reg_read_ioctl(struct drm_device *dev, void *data,
struct drm_file *file); struct drm_file *file);
......
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
#include "intel_lspcon.h" #include "intel_lspcon.h"
#include "intel_panel.h" #include "intel_panel.h"
#include "intel_psr.h" #include "intel_psr.h"
#include "intel_vdsc.h"
struct ddi_buf_trans { struct ddi_buf_trans {
u32 trans1; /* balance leg enable, de-emph level */ u32 trans1; /* balance leg enable, de-emph level */
......
...@@ -73,6 +73,7 @@ ...@@ -73,6 +73,7 @@
#include "intel_sideband.h" #include "intel_sideband.h"
#include "intel_sprite.h" #include "intel_sprite.h"
#include "intel_tv.h" #include "intel_tv.h"
#include "intel_vdsc.h"
/* Primary plane formats for gen <= 3 */ /* Primary plane formats for gen <= 3 */
static const u32 i8xx_primary_formats[] = { static const u32 i8xx_primary_formats[] = {
......
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
#include "intel_panel.h" #include "intel_panel.h"
#include "intel_psr.h" #include "intel_psr.h"
#include "intel_sideband.h" #include "intel_sideband.h"
#include "intel_vdsc.h"
#define DP_DPRX_ESI_LEN 14 #define DP_DPRX_ESI_LEN 14
......
...@@ -1766,12 +1766,6 @@ unsigned int i9xx_plane_max_stride(struct intel_plane *plane, ...@@ -1766,12 +1766,6 @@ unsigned int i9xx_plane_max_stride(struct intel_plane *plane,
u32 pixel_format, u64 modifier, u32 pixel_format, u64 modifier,
unsigned int rotation); unsigned int rotation);
/* intel_vdsc.c */
int intel_dp_compute_dsc_params(struct intel_dp *intel_dp,
struct intel_crtc_state *pipe_config);
enum intel_display_power_domain
intel_dsc_power_domain(const struct intel_crtc_state *crtc_state);
/* intel_dp_mst.c */ /* intel_dp_mst.c */
int intel_dp_mst_encoder_init(struct intel_digital_port *intel_dig_port, int conn_id); int intel_dp_mst_encoder_init(struct intel_digital_port *intel_dig_port, int conn_id);
void intel_dp_mst_encoder_cleanup(struct intel_digital_port *intel_dig_port); void intel_dp_mst_encoder_cleanup(struct intel_digital_port *intel_dig_port);
......
...@@ -7,8 +7,10 @@ ...@@ -7,8 +7,10 @@
*/ */
#include <drm/i915_drm.h> #include <drm/i915_drm.h>
#include "i915_drv.h" #include "i915_drv.h"
#include "intel_drv.h" #include "intel_drv.h"
#include "intel_vdsc.h"
enum ROW_INDEX_BPP { enum ROW_INDEX_BPP {
ROW_INDEX_6BPP = 0, ROW_INDEX_6BPP = 0,
......
/* SPDX-License-Identifier: MIT */
/*
* Copyright © 2019 Intel Corporation
*/
#ifndef __INTEL_VDSC_H__
#define __INTEL_VDSC_H__
struct intel_encoder;
struct intel_crtc_state;
struct intel_dp;
void intel_dsc_enable(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state);
void intel_dsc_disable(const struct intel_crtc_state *crtc_state);
int intel_dp_compute_dsc_params(struct intel_dp *intel_dp,
struct intel_crtc_state *pipe_config);
enum intel_display_power_domain
intel_dsc_power_domain(const struct intel_crtc_state *crtc_state);
#endif /* __INTEL_VDSC_H__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment