Commit 33f2d94e authored by Harry Wentland's avatar Harry Wentland Committed by Alex Deucher

drm/amd/display: Clean up formatting in irq_service_dce110.c

Signed-off-by: default avatarHarry Wentland <harry.wentland@amd.com>
Reviewed-by: default avatarRoman Li <Roman.Li@amd.com>
Acked-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent a0e30392
...@@ -39,27 +39,22 @@ ...@@ -39,27 +39,22 @@
#define DC_LOGGER \ #define DC_LOGGER \
irq_service->ctx->logger irq_service->ctx->logger
static bool hpd_ack( static bool hpd_ack(struct irq_service *irq_service,
struct irq_service *irq_service, const struct irq_source_info *info)
const struct irq_source_info *info)
{ {
uint32_t addr = info->status_reg; uint32_t addr = info->status_reg;
uint32_t value = dm_read_reg(irq_service->ctx, addr); uint32_t value = dm_read_reg(irq_service->ctx, addr);
uint32_t current_status = uint32_t current_status = get_reg_field_value(value,
get_reg_field_value( DC_HPD_INT_STATUS,
value, DC_HPD_SENSE_DELAYED);
DC_HPD_INT_STATUS,
DC_HPD_SENSE_DELAYED);
dal_irq_service_ack_generic(irq_service, info); dal_irq_service_ack_generic(irq_service, info);
value = dm_read_reg(irq_service->ctx, info->enable_reg); value = dm_read_reg(irq_service->ctx, info->enable_reg);
set_reg_field_value( set_reg_field_value(value, current_status ? 0 : 1,
value, DC_HPD_INT_CONTROL,
current_status ? 0 : 1, DC_HPD_INT_POLARITY);
DC_HPD_INT_CONTROL,
DC_HPD_INT_POLARITY);
dm_write_reg(irq_service->ctx, info->enable_reg, value); dm_write_reg(irq_service->ctx, info->enable_reg, value);
...@@ -179,37 +174,34 @@ static const struct irq_source_info_funcs vblank_irq_info_funcs = { ...@@ -179,37 +174,34 @@ static const struct irq_source_info_funcs vblank_irq_info_funcs = {
#define dc_underflow_int_entry(reg_num) \ #define dc_underflow_int_entry(reg_num) \
[DC_IRQ_SOURCE_DC ## reg_num ## UNDERFLOW] = dummy_irq_entry() [DC_IRQ_SOURCE_DC ## reg_num ## UNDERFLOW] = dummy_irq_entry()
bool dal_irq_service_dummy_set( bool dal_irq_service_dummy_set(struct irq_service *irq_service,
struct irq_service *irq_service, const struct irq_source_info *info,
const struct irq_source_info *info, bool enable)
bool enable)
{ {
DC_LOG_ERROR("%s: called for non-implemented irq source\n", DC_LOG_ERROR("%s: called for non-implemented irq source\n",
__func__); __func__);
return false; return false;
} }
bool dal_irq_service_dummy_ack( bool dal_irq_service_dummy_ack(struct irq_service *irq_service,
struct irq_service *irq_service, const struct irq_source_info *info)
const struct irq_source_info *info)
{ {
DC_LOG_ERROR("%s: called for non-implemented irq source\n", DC_LOG_ERROR("%s: called for non-implemented irq source\n",
__func__); __func__);
return false; return false;
} }
bool dce110_vblank_set( bool dce110_vblank_set(struct irq_service *irq_service,
struct irq_service *irq_service, const struct irq_source_info *info,
const struct irq_source_info *info, bool enable)
bool enable)
{ {
struct dc_context *dc_ctx = irq_service->ctx; struct dc_context *dc_ctx = irq_service->ctx;
struct dc *core_dc = irq_service->ctx->dc; struct dc *core_dc = irq_service->ctx->dc;
enum dc_irq_source dal_irq_src = dc_interrupt_to_irq_source( enum dc_irq_source dal_irq_src =
irq_service->ctx->dc, dc_interrupt_to_irq_source(irq_service->ctx->dc,
info->src_id, info->src_id,
info->ext_id); info->ext_id);
uint8_t pipe_offset = dal_irq_src - IRQ_TYPE_VBLANK; uint8_t pipe_offset = dal_irq_src - IRQ_TYPE_VBLANK;
struct timing_generator *tg = struct timing_generator *tg =
...@@ -224,7 +216,6 @@ bool dce110_vblank_set( ...@@ -224,7 +216,6 @@ bool dce110_vblank_set(
dal_irq_service_set_generic(irq_service, info, enable); dal_irq_service_set_generic(irq_service, info, enable);
return true; return true;
} }
static const struct irq_source_info_funcs dummy_irq_info_funcs = { static const struct irq_source_info_funcs dummy_irq_info_funcs = {
...@@ -405,9 +396,8 @@ static const struct irq_service_funcs irq_service_funcs_dce110 = { ...@@ -405,9 +396,8 @@ static const struct irq_service_funcs irq_service_funcs_dce110 = {
.to_dal_irq_source = to_dal_irq_source_dce110 .to_dal_irq_source = to_dal_irq_source_dce110
}; };
static void construct( static void construct(struct irq_service *irq_service,
struct irq_service *irq_service, struct irq_service_init_data *init_data)
struct irq_service_init_data *init_data)
{ {
dal_irq_service_construct(irq_service, init_data); dal_irq_service_construct(irq_service, init_data);
...@@ -415,8 +405,8 @@ static void construct( ...@@ -415,8 +405,8 @@ static void construct(
irq_service->funcs = &irq_service_funcs_dce110; irq_service->funcs = &irq_service_funcs_dce110;
} }
struct irq_service *dal_irq_service_dce110_create( struct irq_service *
struct irq_service_init_data *init_data) dal_irq_service_dce110_create(struct irq_service_init_data *init_data)
{ {
struct irq_service *irq_service = kzalloc(sizeof(*irq_service), struct irq_service *irq_service = kzalloc(sizeof(*irq_service),
GFP_KERNEL); GFP_KERNEL);
......
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