Commit 3ee6b26b authored by Alex Deucher's avatar Alex Deucher Committed by Dave Airlie

drm/amd/display: whitespace cleanup in amdgpu_dm.c/h

To match kernel standards.  No intended functional change.
Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 1daf8c63
...@@ -184,8 +184,8 @@ static int dm_soft_reset(void *handle) ...@@ -184,8 +184,8 @@ static int dm_soft_reset(void *handle)
return 0; return 0;
} }
static struct amdgpu_crtc *get_crtc_by_otg_inst( static struct amdgpu_crtc *
struct amdgpu_device *adev, get_crtc_by_otg_inst(struct amdgpu_device *adev,
int otg_inst) int otg_inst)
{ {
struct drm_device *dev = adev->ddev; struct drm_device *dev = adev->ddev;
...@@ -738,8 +738,8 @@ static struct drm_mode_config_helper_funcs amdgpu_dm_mode_config_helperfuncs = { ...@@ -738,8 +738,8 @@ static struct drm_mode_config_helper_funcs amdgpu_dm_mode_config_helperfuncs = {
.atomic_commit_tail = amdgpu_dm_atomic_commit_tail .atomic_commit_tail = amdgpu_dm_atomic_commit_tail
}; };
void amdgpu_dm_update_connector_after_detect( void
struct amdgpu_dm_connector *aconnector) amdgpu_dm_update_connector_after_detect(struct amdgpu_dm_connector *aconnector)
{ {
struct drm_connector *connector = &aconnector->base; struct drm_connector *connector = &aconnector->base;
struct drm_device *dev = connector->dev; struct drm_device *dev = connector->dev;
...@@ -1490,8 +1490,7 @@ static const struct amdgpu_display_funcs dm_display_funcs = { ...@@ -1490,8 +1490,7 @@ static const struct amdgpu_display_funcs dm_display_funcs = {
#if defined(CONFIG_DEBUG_KERNEL_DC) #if defined(CONFIG_DEBUG_KERNEL_DC)
static ssize_t s3_debug_store( static ssize_t s3_debug_store(struct device *device,
struct device *device,
struct device_attribute *attr, struct device_attribute *attr,
const char *buf, const char *buf,
size_t count) size_t count)
...@@ -1670,8 +1669,7 @@ static const struct drm_encoder_funcs amdgpu_dm_encoder_funcs = { ...@@ -1670,8 +1669,7 @@ static const struct drm_encoder_funcs amdgpu_dm_encoder_funcs = {
.destroy = amdgpu_dm_encoder_destroy, .destroy = amdgpu_dm_encoder_destroy,
}; };
static bool fill_rects_from_plane_state( static bool fill_rects_from_plane_state(const struct drm_plane_state *state,
const struct drm_plane_state *state,
struct dc_plane_state *plane_state) struct dc_plane_state *plane_state)
{ {
plane_state->src_rect.x = state->src_x >> 16; plane_state->src_rect.x = state->src_x >> 16;
...@@ -1721,8 +1719,7 @@ static bool fill_rects_from_plane_state( ...@@ -1721,8 +1719,7 @@ static bool fill_rects_from_plane_state(
return true; return true;
} }
static int get_fb_info( static int get_fb_info(const struct amdgpu_framebuffer *amdgpu_fb,
const struct amdgpu_framebuffer *amdgpu_fb,
uint64_t *tiling_flags, uint64_t *tiling_flags,
uint64_t *fb_location) uint64_t *fb_location)
{ {
...@@ -1745,10 +1742,10 @@ static int get_fb_info( ...@@ -1745,10 +1742,10 @@ static int get_fb_info(
return r; return r;
} }
static int fill_plane_attributes_from_fb( static int fill_plane_attributes_from_fb(struct amdgpu_device *adev,
struct amdgpu_device *adev,
struct dc_plane_state *plane_state, struct dc_plane_state *plane_state,
const struct amdgpu_framebuffer *amdgpu_fb, bool addReq) const struct amdgpu_framebuffer *amdgpu_fb,
bool addReq)
{ {
uint64_t tiling_flags; uint64_t tiling_flags;
uint64_t fb_location = 0; uint64_t fb_location = 0;
...@@ -1897,8 +1894,7 @@ static int fill_plane_attributes_from_fb( ...@@ -1897,8 +1894,7 @@ static int fill_plane_attributes_from_fb(
} }
static void fill_gamma_from_crtc_state( static void fill_gamma_from_crtc_state(const struct drm_crtc_state *crtc_state,
const struct drm_crtc_state *crtc_state,
struct dc_plane_state *plane_state) struct dc_plane_state *plane_state)
{ {
int i; int i;
...@@ -1924,8 +1920,7 @@ static void fill_gamma_from_crtc_state( ...@@ -1924,8 +1920,7 @@ static void fill_gamma_from_crtc_state(
plane_state->gamma_correction = gamma; plane_state->gamma_correction = gamma;
} }
static int fill_plane_attributes( static int fill_plane_attributes(struct amdgpu_device *adev,
struct amdgpu_device *adev,
struct dc_plane_state *dc_plane_state, struct dc_plane_state *dc_plane_state,
struct drm_plane_state *plane_state, struct drm_plane_state *plane_state,
struct drm_crtc_state *crtc_state, struct drm_crtc_state *crtc_state,
...@@ -1968,8 +1963,8 @@ static int fill_plane_attributes( ...@@ -1968,8 +1963,8 @@ static int fill_plane_attributes(
/*****************************************************************************/ /*****************************************************************************/
struct amdgpu_dm_connector *aconnector_from_drm_crtc_id( struct amdgpu_dm_connector *
const struct drm_crtc *crtc) aconnector_from_drm_crtc_id(const struct drm_crtc *crtc)
{ {
struct drm_device *dev = crtc->dev; struct drm_device *dev = crtc->dev;
struct drm_connector *connector; struct drm_connector *connector;
...@@ -1992,8 +1987,7 @@ struct amdgpu_dm_connector *aconnector_from_drm_crtc_id( ...@@ -1992,8 +1987,7 @@ struct amdgpu_dm_connector *aconnector_from_drm_crtc_id(
return NULL; return NULL;
} }
static void update_stream_scaling_settings( static void update_stream_scaling_settings(const struct drm_display_mode *mode,
const struct drm_display_mode *mode,
const struct dm_connector_state *dm_state, const struct dm_connector_state *dm_state,
struct dc_stream_state *stream) struct dc_stream_state *stream)
{ {
...@@ -2046,8 +2040,8 @@ static void update_stream_scaling_settings( ...@@ -2046,8 +2040,8 @@ static void update_stream_scaling_settings(
} }
static enum dc_color_depth convert_color_depth_from_display_info( static enum dc_color_depth
const struct drm_connector *connector) convert_color_depth_from_display_info(const struct drm_connector *connector)
{ {
uint32_t bpc = connector->display_info.bpc; uint32_t bpc = connector->display_info.bpc;
...@@ -2081,8 +2075,8 @@ static enum dc_color_depth convert_color_depth_from_display_info( ...@@ -2081,8 +2075,8 @@ static enum dc_color_depth convert_color_depth_from_display_info(
} }
} }
static enum dc_aspect_ratio get_aspect_ratio( static enum dc_aspect_ratio
const struct drm_display_mode *mode_in) get_aspect_ratio(const struct drm_display_mode *mode_in)
{ {
int32_t width = mode_in->crtc_hdisplay * 9; int32_t width = mode_in->crtc_hdisplay * 9;
int32_t height = mode_in->crtc_vdisplay * 16; int32_t height = mode_in->crtc_vdisplay * 16;
...@@ -2093,8 +2087,8 @@ static enum dc_aspect_ratio get_aspect_ratio( ...@@ -2093,8 +2087,8 @@ static enum dc_aspect_ratio get_aspect_ratio(
return ASPECT_RATIO_4_3; return ASPECT_RATIO_4_3;
} }
static enum dc_color_space get_output_color_space( static enum dc_color_space
const struct dc_crtc_timing *dc_crtc_timing) get_output_color_space(const struct dc_crtc_timing *dc_crtc_timing)
{ {
enum dc_color_space color_space = COLOR_SPACE_SRGB; enum dc_color_space color_space = COLOR_SPACE_SRGB;
...@@ -2138,8 +2132,8 @@ static enum dc_color_space get_output_color_space( ...@@ -2138,8 +2132,8 @@ static enum dc_color_space get_output_color_space(
/*****************************************************************************/ /*****************************************************************************/
static void fill_stream_properties_from_drm_display_mode( static void
struct dc_stream_state *stream, fill_stream_properties_from_drm_display_mode(struct dc_stream_state *stream,
const struct drm_display_mode *mode_in, const struct drm_display_mode *mode_in,
const struct drm_connector *connector) const struct drm_connector *connector)
{ {
...@@ -2196,8 +2190,7 @@ static void fill_stream_properties_from_drm_display_mode( ...@@ -2196,8 +2190,7 @@ static void fill_stream_properties_from_drm_display_mode(
} }
} }
static void fill_audio_info( static void fill_audio_info(struct audio_info *audio_info,
struct audio_info *audio_info,
const struct drm_connector *drm_connector, const struct drm_connector *drm_connector,
const struct dc_sink *dc_sink) const struct dc_sink *dc_sink)
{ {
...@@ -2244,8 +2237,8 @@ static void fill_audio_info( ...@@ -2244,8 +2237,8 @@ static void fill_audio_info(
} }
static void copy_crtc_timing_for_drm_display_mode( static void
const struct drm_display_mode *src_mode, copy_crtc_timing_for_drm_display_mode(const struct drm_display_mode *src_mode,
struct drm_display_mode *dst_mode) struct drm_display_mode *dst_mode)
{ {
dst_mode->crtc_hdisplay = src_mode->crtc_hdisplay; dst_mode->crtc_hdisplay = src_mode->crtc_hdisplay;
...@@ -2264,8 +2257,8 @@ static void copy_crtc_timing_for_drm_display_mode( ...@@ -2264,8 +2257,8 @@ static void copy_crtc_timing_for_drm_display_mode(
dst_mode->crtc_vtotal = src_mode->crtc_vtotal; dst_mode->crtc_vtotal = src_mode->crtc_vtotal;
} }
static void decide_crtc_timing_for_drm_display_mode( static void
struct drm_display_mode *drm_mode, decide_crtc_timing_for_drm_display_mode(struct drm_display_mode *drm_mode,
const struct drm_display_mode *native_mode, const struct drm_display_mode *native_mode,
bool scale_enabled) bool scale_enabled)
{ {
...@@ -2299,8 +2292,8 @@ static void create_fake_sink(struct amdgpu_dm_connector *aconnector) ...@@ -2299,8 +2292,8 @@ static void create_fake_sink(struct amdgpu_dm_connector *aconnector)
aconnector->dc_link->local_sink = sink; aconnector->dc_link->local_sink = sink;
} }
static struct dc_stream_state *create_stream_for_sink( static struct dc_stream_state *
struct amdgpu_dm_connector *aconnector, create_stream_for_sink(struct amdgpu_dm_connector *aconnector,
const struct drm_display_mode *drm_mode, const struct drm_display_mode *drm_mode,
const struct dm_connector_state *dm_state) const struct dm_connector_state *dm_state)
{ {
...@@ -2466,8 +2459,7 @@ amdgpu_dm_connector_detect(struct drm_connector *connector, bool force) ...@@ -2466,8 +2459,7 @@ amdgpu_dm_connector_detect(struct drm_connector *connector, bool force)
connector_status_disconnected); connector_status_disconnected);
} }
int amdgpu_dm_connector_atomic_set_property( int amdgpu_dm_connector_atomic_set_property(struct drm_connector *connector,
struct drm_connector *connector,
struct drm_connector_state *connector_state, struct drm_connector_state *connector_state,
struct drm_property *property, struct drm_property *property,
uint64_t val) uint64_t val)
...@@ -2519,8 +2511,7 @@ int amdgpu_dm_connector_atomic_set_property( ...@@ -2519,8 +2511,7 @@ int amdgpu_dm_connector_atomic_set_property(
return ret; return ret;
} }
int amdgpu_dm_connector_atomic_get_property( int amdgpu_dm_connector_atomic_get_property(struct drm_connector *connector,
struct drm_connector *connector,
const struct drm_connector_state *state, const struct drm_connector_state *state,
struct drm_property *property, struct drm_property *property,
uint64_t *val) uint64_t *val)
...@@ -2605,8 +2596,8 @@ void amdgpu_dm_connector_funcs_reset(struct drm_connector *connector) ...@@ -2605,8 +2596,8 @@ void amdgpu_dm_connector_funcs_reset(struct drm_connector *connector)
} }
} }
struct drm_connector_state *amdgpu_dm_connector_atomic_duplicate_state( struct drm_connector_state *
struct drm_connector *connector) amdgpu_dm_connector_atomic_duplicate_state(struct drm_connector *connector)
{ {
struct dm_connector_state *state = struct dm_connector_state *state =
to_dm_connector_state(connector->state); to_dm_connector_state(connector->state);
...@@ -2711,8 +2702,7 @@ static void handle_edid_mgmt(struct amdgpu_dm_connector *aconnector) ...@@ -2711,8 +2702,7 @@ static void handle_edid_mgmt(struct amdgpu_dm_connector *aconnector)
create_eml_sink(aconnector); create_eml_sink(aconnector);
} }
int amdgpu_dm_connector_mode_valid( int amdgpu_dm_connector_mode_valid(struct drm_connector *connector,
struct drm_connector *connector,
struct drm_display_mode *mode) struct drm_display_mode *mode)
{ {
int result = MODE_ERROR; int result = MODE_ERROR;
...@@ -2780,8 +2770,7 @@ static void dm_crtc_helper_disable(struct drm_crtc *crtc) ...@@ -2780,8 +2770,7 @@ static void dm_crtc_helper_disable(struct drm_crtc *crtc)
{ {
} }
static int dm_crtc_helper_atomic_check( static int dm_crtc_helper_atomic_check(struct drm_crtc *crtc,
struct drm_crtc *crtc,
struct drm_crtc_state *state) struct drm_crtc_state *state)
{ {
struct amdgpu_device *adev = crtc->dev->dev_private; struct amdgpu_device *adev = crtc->dev->dev_private;
...@@ -2805,8 +2794,7 @@ static int dm_crtc_helper_atomic_check( ...@@ -2805,8 +2794,7 @@ static int dm_crtc_helper_atomic_check(
return ret; return ret;
} }
static bool dm_crtc_helper_mode_fixup( static bool dm_crtc_helper_mode_fixup(struct drm_crtc *crtc,
struct drm_crtc *crtc,
const struct drm_display_mode *mode, const struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode) struct drm_display_mode *adjusted_mode)
{ {
...@@ -2824,8 +2812,7 @@ static void dm_encoder_helper_disable(struct drm_encoder *encoder) ...@@ -2824,8 +2812,7 @@ static void dm_encoder_helper_disable(struct drm_encoder *encoder)
} }
static int dm_encoder_helper_atomic_check( static int dm_encoder_helper_atomic_check(struct drm_encoder *encoder,
struct drm_encoder *encoder,
struct drm_crtc_state *crtc_state, struct drm_crtc_state *crtc_state,
struct drm_connector_state *conn_state) struct drm_connector_state *conn_state)
{ {
...@@ -2894,8 +2881,7 @@ static const struct drm_plane_funcs dm_plane_funcs = { ...@@ -2894,8 +2881,7 @@ static const struct drm_plane_funcs dm_plane_funcs = {
.atomic_destroy_state = dm_drm_plane_destroy_state, .atomic_destroy_state = dm_drm_plane_destroy_state,
}; };
static int dm_plane_helper_prepare_fb( static int dm_plane_helper_prepare_fb(struct drm_plane *plane,
struct drm_plane *plane,
struct drm_plane_state *new_state) struct drm_plane_state *new_state)
{ {
struct amdgpu_framebuffer *afb; struct amdgpu_framebuffer *afb;
...@@ -2964,8 +2950,7 @@ static int dm_plane_helper_prepare_fb( ...@@ -2964,8 +2950,7 @@ static int dm_plane_helper_prepare_fb(
return 0; return 0;
} }
static void dm_plane_helper_cleanup_fb( static void dm_plane_helper_cleanup_fb(struct drm_plane *plane,
struct drm_plane *plane,
struct drm_plane_state *old_state) struct drm_plane_state *old_state)
{ {
struct amdgpu_bo *rbo; struct amdgpu_bo *rbo;
...@@ -2989,7 +2974,8 @@ static void dm_plane_helper_cleanup_fb( ...@@ -2989,7 +2974,8 @@ static void dm_plane_helper_cleanup_fb(
} }
int dm_create_validation_set_for_connector(struct drm_connector *connector, int dm_create_validation_set_for_connector(struct drm_connector *connector,
struct drm_display_mode *mode, struct dc_validation_set *val_set) struct drm_display_mode *mode,
struct dc_validation_set *val_set)
{ {
int result = MODE_ERROR; int result = MODE_ERROR;
struct dc_sink *dc_sink = struct dc_sink *dc_sink =
...@@ -3224,8 +3210,9 @@ static void amdgpu_dm_get_native_mode(struct drm_connector *connector) ...@@ -3224,8 +3210,9 @@ static void amdgpu_dm_get_native_mode(struct drm_connector *connector)
} }
} }
static struct drm_display_mode *amdgpu_dm_create_common_mode( static struct drm_display_mode *
struct drm_encoder *encoder, char *name, amdgpu_dm_create_common_mode(struct drm_encoder *encoder,
char *name,
int hdisplay, int vdisplay) int hdisplay, int vdisplay)
{ {
struct drm_device *dev = encoder->dev; struct drm_device *dev = encoder->dev;
...@@ -3306,8 +3293,7 @@ static void amdgpu_dm_connector_add_common_modes(struct drm_encoder *encoder, ...@@ -3306,8 +3293,7 @@ static void amdgpu_dm_connector_add_common_modes(struct drm_encoder *encoder,
} }
} }
static void amdgpu_dm_connector_ddc_get_modes( static void amdgpu_dm_connector_ddc_get_modes(struct drm_connector *connector,
struct drm_connector *connector,
struct edid *edid) struct edid *edid)
{ {
struct amdgpu_dm_connector *amdgpu_dm_connector = struct amdgpu_dm_connector *amdgpu_dm_connector =
...@@ -3342,8 +3328,7 @@ int amdgpu_dm_connector_get_modes(struct drm_connector *connector) ...@@ -3342,8 +3328,7 @@ int amdgpu_dm_connector_get_modes(struct drm_connector *connector)
return amdgpu_dm_connector->num_modes; return amdgpu_dm_connector->num_modes;
} }
void amdgpu_dm_connector_init_helper( void amdgpu_dm_connector_init_helper(struct amdgpu_display_manager *dm,
struct amdgpu_display_manager *dm,
struct amdgpu_dm_connector *aconnector, struct amdgpu_dm_connector *aconnector,
int connector_type, int connector_type,
struct dc_link *link, struct dc_link *link,
...@@ -3439,8 +3424,8 @@ static const struct i2c_algorithm amdgpu_dm_i2c_algo = { ...@@ -3439,8 +3424,8 @@ static const struct i2c_algorithm amdgpu_dm_i2c_algo = {
.functionality = amdgpu_dm_i2c_func, .functionality = amdgpu_dm_i2c_func,
}; };
static struct amdgpu_i2c_adapter *create_i2c( static struct amdgpu_i2c_adapter *
struct ddc_service *ddc_service, create_i2c(struct ddc_service *ddc_service,
int link_index, int link_index,
int *res) int *res)
{ {
...@@ -3462,8 +3447,7 @@ static struct amdgpu_i2c_adapter *create_i2c( ...@@ -3462,8 +3447,7 @@ static struct amdgpu_i2c_adapter *create_i2c(
/* Note: this function assumes that dc_link_detect() was called for the /* Note: this function assumes that dc_link_detect() was called for the
* dc_link which will be represented by this aconnector. * dc_link which will be represented by this aconnector.
*/ */
int amdgpu_dm_connector_init( int amdgpu_dm_connector_init(struct amdgpu_display_manager *dm,
struct amdgpu_display_manager *dm,
struct amdgpu_dm_connector *aconnector, struct amdgpu_dm_connector *aconnector,
uint32_t link_index, uint32_t link_index,
struct amdgpu_encoder *aencoder) struct amdgpu_encoder *aencoder)
...@@ -3569,8 +3553,7 @@ int amdgpu_dm_get_encoder_crtc_mask(struct amdgpu_device *adev) ...@@ -3569,8 +3553,7 @@ int amdgpu_dm_get_encoder_crtc_mask(struct amdgpu_device *adev)
} }
} }
int amdgpu_dm_encoder_init( int amdgpu_dm_encoder_init(struct drm_device *dev,
struct drm_device *dev,
struct amdgpu_encoder *aencoder, struct amdgpu_encoder *aencoder,
uint32_t link_index) uint32_t link_index)
{ {
...@@ -3594,8 +3577,7 @@ int amdgpu_dm_encoder_init( ...@@ -3594,8 +3577,7 @@ int amdgpu_dm_encoder_init(
return res; return res;
} }
static void manage_dm_interrupts( static void manage_dm_interrupts(struct amdgpu_device *adev,
struct amdgpu_device *adev,
struct amdgpu_crtc *acrtc, struct amdgpu_crtc *acrtc,
bool enable) bool enable)
{ {
...@@ -3624,8 +3606,8 @@ static void manage_dm_interrupts( ...@@ -3624,8 +3606,8 @@ static void manage_dm_interrupts(
} }
} }
static bool is_scaling_state_different( static bool
const struct dm_connector_state *dm_state, is_scaling_state_different(const struct dm_connector_state *dm_state,
const struct dm_connector_state *old_dm_state) const struct dm_connector_state *old_dm_state)
{ {
if (dm_state->scaling != old_dm_state->scaling) if (dm_state->scaling != old_dm_state->scaling)
...@@ -3642,8 +3624,7 @@ static bool is_scaling_state_different( ...@@ -3642,8 +3624,7 @@ static bool is_scaling_state_different(
return false; return false;
} }
static void remove_stream( static void remove_stream(struct amdgpu_device *adev,
struct amdgpu_device *adev,
struct amdgpu_crtc *acrtc, struct amdgpu_crtc *acrtc,
struct dc_stream_state *stream) struct dc_stream_state *stream)
{ {
...@@ -3700,8 +3681,7 @@ int get_cursor_position(struct drm_plane *plane, struct drm_crtc *crtc, ...@@ -3700,8 +3681,7 @@ int get_cursor_position(struct drm_plane *plane, struct drm_crtc *crtc,
return 0; return 0;
} }
static void handle_cursor_update( static void handle_cursor_update(struct drm_plane *plane,
struct drm_plane *plane,
struct drm_plane_state *old_plane_state) struct drm_plane_state *old_plane_state)
{ {
struct amdgpu_framebuffer *afb = to_amdgpu_framebuffer(plane->state->fb); struct amdgpu_framebuffer *afb = to_amdgpu_framebuffer(plane->state->fb);
...@@ -3780,8 +3760,7 @@ static void prepare_flip_isr(struct amdgpu_crtc *acrtc) ...@@ -3780,8 +3760,7 @@ static void prepare_flip_isr(struct amdgpu_crtc *acrtc)
* *
* Waits on all BO's fences and for proper vblank count * Waits on all BO's fences and for proper vblank count
*/ */
static void amdgpu_dm_do_flip( static void amdgpu_dm_do_flip(struct drm_crtc *crtc,
struct drm_crtc *crtc,
struct drm_framebuffer *fb, struct drm_framebuffer *fb,
uint32_t target) uint32_t target)
{ {
...@@ -3965,8 +3944,7 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state, ...@@ -3965,8 +3944,7 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
} }
int amdgpu_dm_atomic_commit( int amdgpu_dm_atomic_commit(struct drm_device *dev,
struct drm_device *dev,
struct drm_atomic_state *state, struct drm_atomic_state *state,
bool nonblock) bool nonblock)
{ {
...@@ -3995,8 +3973,7 @@ int amdgpu_dm_atomic_commit( ...@@ -3995,8 +3973,7 @@ int amdgpu_dm_atomic_commit(
/*TODO Handle EINTR, reenable IRQ*/ /*TODO Handle EINTR, reenable IRQ*/
} }
void amdgpu_dm_atomic_commit_tail( void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
struct drm_atomic_state *state)
{ {
struct drm_device *dev = state->dev; struct drm_device *dev = state->dev;
struct amdgpu_device *adev = dev->dev_private; struct amdgpu_device *adev = dev->dev_private;
...@@ -4294,7 +4271,8 @@ static int dm_force_atomic_commit(struct drm_connector *connector) ...@@ -4294,7 +4271,8 @@ static int dm_force_atomic_commit(struct drm_connector *connector)
* This include when the same display is unplugged then plugged back into the * This include when the same display is unplugged then plugged back into the
* same port and when we are running without usermode desktop manager supprot * same port and when we are running without usermode desktop manager supprot
*/ */
void dm_restore_drm_connector_state(struct drm_device *dev, struct drm_connector *connector) void dm_restore_drm_connector_state(struct drm_device *dev,
struct drm_connector *connector)
{ {
struct amdgpu_dm_connector *aconnector = to_amdgpu_dm_connector(connector); struct amdgpu_dm_connector *aconnector = to_amdgpu_dm_connector(connector);
struct amdgpu_crtc *disconnected_acrtc; struct amdgpu_crtc *disconnected_acrtc;
...@@ -4322,8 +4300,7 @@ void dm_restore_drm_connector_state(struct drm_device *dev, struct drm_connector ...@@ -4322,8 +4300,7 @@ void dm_restore_drm_connector_state(struct drm_device *dev, struct drm_connector
* Grabs all modesetting locks to serialize against any blocking commits, * Grabs all modesetting locks to serialize against any blocking commits,
* Waits for completion of all non blocking commits. * Waits for completion of all non blocking commits.
*/ */
static int do_aquire_global_lock( static int do_aquire_global_lock(struct drm_device *dev,
struct drm_device *dev,
struct drm_atomic_state *state) struct drm_atomic_state *state)
{ {
struct drm_crtc *crtc; struct drm_crtc *crtc;
...@@ -4368,8 +4345,7 @@ static int do_aquire_global_lock( ...@@ -4368,8 +4345,7 @@ static int do_aquire_global_lock(
return ret < 0 ? ret : 0; return ret < 0 ? ret : 0;
} }
static int dm_update_crtcs_state( static int dm_update_crtcs_state(struct dc *dc,
struct dc *dc,
struct drm_atomic_state *state, struct drm_atomic_state *state,
bool enable, bool enable,
bool *lock_and_validation_needed) bool *lock_and_validation_needed)
...@@ -4517,8 +4493,7 @@ static int dm_update_crtcs_state( ...@@ -4517,8 +4493,7 @@ static int dm_update_crtcs_state(
return ret; return ret;
} }
static int dm_update_planes_state( static int dm_update_planes_state(struct dc *dc,
struct dc *dc,
struct drm_atomic_state *state, struct drm_atomic_state *state,
bool enable, bool enable,
bool *lock_and_validation_needed) bool *lock_and_validation_needed)
...@@ -4766,8 +4741,7 @@ int amdgpu_dm_atomic_check(struct drm_device *dev, ...@@ -4766,8 +4741,7 @@ int amdgpu_dm_atomic_check(struct drm_device *dev,
return ret; return ret;
} }
static bool is_dp_capable_without_timing_msa( static bool is_dp_capable_without_timing_msa(struct dc *dc,
struct dc *dc,
struct amdgpu_dm_connector *amdgpu_dm_connector) struct amdgpu_dm_connector *amdgpu_dm_connector)
{ {
uint8_t dpcd_data; uint8_t dpcd_data;
...@@ -4785,8 +4759,7 @@ static bool is_dp_capable_without_timing_msa( ...@@ -4785,8 +4759,7 @@ static bool is_dp_capable_without_timing_msa(
return capable; return capable;
} }
void amdgpu_dm_add_sink_to_freesync_module( void amdgpu_dm_add_sink_to_freesync_module(struct drm_connector *connector,
struct drm_connector *connector,
struct edid *edid) struct edid *edid)
{ {
int i; int i;
...@@ -4867,8 +4840,7 @@ void amdgpu_dm_add_sink_to_freesync_module( ...@@ -4867,8 +4840,7 @@ void amdgpu_dm_add_sink_to_freesync_module(
} }
void amdgpu_dm_remove_sink_from_freesync_module( void amdgpu_dm_remove_sink_from_freesync_module(struct drm_connector *connector)
struct drm_connector *connector)
{ {
/* /*
* TODO fill in once we figure out how to deal with freesync in * TODO fill in once we figure out how to deal with freesync in
......
...@@ -206,12 +206,10 @@ void amdgpu_dm_destroy(void); ...@@ -206,12 +206,10 @@ void amdgpu_dm_destroy(void);
* *
* Returns 0 on success * Returns 0 on success
*/ */
int amdgpu_dm_initialize_drm_device( int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev);
struct amdgpu_device *adev);
/* removes and deallocates the drm structures, created by the above function */ /* removes and deallocates the drm structures, created by the above function */
void amdgpu_dm_destroy_drm_device( void amdgpu_dm_destroy_drm_device(struct amdgpu_display_manager *dm);
struct amdgpu_display_manager *dm);
/* Locking/Mutex */ /* Locking/Mutex */
bool amdgpu_dm_acquire_dal_lock(struct amdgpu_display_manager *dm); bool amdgpu_dm_acquire_dal_lock(struct amdgpu_display_manager *dm);
...@@ -223,8 +221,8 @@ void amdgpu_dm_register_backlight_device(struct amdgpu_display_manager *dm); ...@@ -223,8 +221,8 @@ void amdgpu_dm_register_backlight_device(struct amdgpu_display_manager *dm);
extern const struct amdgpu_ip_block_version dm_ip_block; extern const struct amdgpu_ip_block_version dm_ip_block;
void amdgpu_dm_update_connector_after_detect( void
struct amdgpu_dm_connector *aconnector); amdgpu_dm_update_connector_after_detect(struct amdgpu_dm_connector *aconnector);
struct amdgpu_framebuffer; struct amdgpu_framebuffer;
struct amdgpu_display_manager; struct amdgpu_display_manager;
...@@ -265,8 +263,7 @@ int amdgpu_dm_connector_init(struct amdgpu_display_manager *dm, ...@@ -265,8 +263,7 @@ int amdgpu_dm_connector_init(struct amdgpu_display_manager *dm,
struct amdgpu_dm_connector *amdgpu_dm_connector, struct amdgpu_dm_connector *amdgpu_dm_connector,
uint32_t link_index, uint32_t link_index,
struct amdgpu_encoder *amdgpu_encoder); struct amdgpu_encoder *amdgpu_encoder);
int amdgpu_dm_encoder_init( int amdgpu_dm_encoder_init(struct drm_device *dev,
struct drm_device *dev,
struct amdgpu_encoder *aencoder, struct amdgpu_encoder *aencoder,
uint32_t link_index); uint32_t link_index);
...@@ -276,53 +273,47 @@ void amdgpu_dm_encoder_destroy(struct drm_encoder *encoder); ...@@ -276,53 +273,47 @@ void amdgpu_dm_encoder_destroy(struct drm_encoder *encoder);
int amdgpu_dm_connector_get_modes(struct drm_connector *connector); int amdgpu_dm_connector_get_modes(struct drm_connector *connector);
int amdgpu_dm_atomic_commit( int amdgpu_dm_atomic_commit(struct drm_device *dev,
struct drm_device *dev,
struct drm_atomic_state *state, struct drm_atomic_state *state,
bool nonblock); bool nonblock);
void amdgpu_dm_atomic_commit_tail( void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state);
struct drm_atomic_state *state);
int amdgpu_dm_atomic_check(struct drm_device *dev, int amdgpu_dm_atomic_check(struct drm_device *dev,
struct drm_atomic_state *state); struct drm_atomic_state *state);
void amdgpu_dm_connector_funcs_reset(struct drm_connector *connector); void amdgpu_dm_connector_funcs_reset(struct drm_connector *connector);
struct drm_connector_state *amdgpu_dm_connector_atomic_duplicate_state( struct drm_connector_state *
struct drm_connector *connector); amdgpu_dm_connector_atomic_duplicate_state(struct drm_connector *connector);
int amdgpu_dm_connector_atomic_set_property( int amdgpu_dm_connector_atomic_set_property(struct drm_connector *connector,
struct drm_connector *connector,
struct drm_connector_state *state, struct drm_connector_state *state,
struct drm_property *property, struct drm_property *property,
uint64_t val); uint64_t val);
int amdgpu_dm_connector_atomic_get_property( int amdgpu_dm_connector_atomic_get_property(struct drm_connector *connector,
struct drm_connector *connector,
const struct drm_connector_state *state, const struct drm_connector_state *state,
struct drm_property *property, struct drm_property *property,
uint64_t *val); uint64_t *val);
int amdgpu_dm_get_encoder_crtc_mask(struct amdgpu_device *adev); int amdgpu_dm_get_encoder_crtc_mask(struct amdgpu_device *adev);
void amdgpu_dm_connector_init_helper( void amdgpu_dm_connector_init_helper(struct amdgpu_display_manager *dm,
struct amdgpu_display_manager *dm,
struct amdgpu_dm_connector *aconnector, struct amdgpu_dm_connector *aconnector,
int connector_type, int connector_type,
struct dc_link *link, struct dc_link *link,
int link_index); int link_index);
int amdgpu_dm_connector_mode_valid( int amdgpu_dm_connector_mode_valid(struct drm_connector *connector,
struct drm_connector *connector,
struct drm_display_mode *mode); struct drm_display_mode *mode);
void dm_restore_drm_connector_state(struct drm_device *dev, struct drm_connector *connector); void dm_restore_drm_connector_state(struct drm_device *dev,
struct drm_connector *connector);
void amdgpu_dm_add_sink_to_freesync_module( void amdgpu_dm_add_sink_to_freesync_module(struct drm_connector *connector,
struct drm_connector *connector,
struct edid *edid); struct edid *edid);
void amdgpu_dm_remove_sink_from_freesync_module( void
struct drm_connector *connector); amdgpu_dm_remove_sink_from_freesync_module(struct drm_connector *connector);
extern const struct drm_encoder_helper_funcs amdgpu_dm_encoder_helper_funcs; extern const struct drm_encoder_helper_funcs amdgpu_dm_encoder_helper_funcs;
......
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