drm/amd/display: create sink_id in dc_sink structure to idenitify all sinks
Signed-off-by: Alvin lee <alvin.lee3@amd.com> Reviewed-by: Jun Lei <Jun.Lei@amd.com> Acked-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
74167ad60c
commit
ce3f6e8224
@ -481,6 +481,7 @@ static bool construct(struct dc *dc,
|
|||||||
dc_ctx->driver_context = init_params->driver;
|
dc_ctx->driver_context = init_params->driver;
|
||||||
dc_ctx->dc = dc;
|
dc_ctx->dc = dc;
|
||||||
dc_ctx->asic_id = init_params->asic_id;
|
dc_ctx->asic_id = init_params->asic_id;
|
||||||
|
dc_ctx->dc_sink_id_count = 0;
|
||||||
dc->ctx = dc_ctx;
|
dc->ctx = dc_ctx;
|
||||||
|
|
||||||
dc->current_state = dc_create_state();
|
dc->current_state = dc_create_state();
|
||||||
|
@ -53,6 +53,10 @@ static bool construct(struct dc_sink *sink, const struct dc_sink_init_data *init
|
|||||||
sink->dongle_max_pix_clk = init_params->dongle_max_pix_clk;
|
sink->dongle_max_pix_clk = init_params->dongle_max_pix_clk;
|
||||||
sink->converter_disable_audio = init_params->converter_disable_audio;
|
sink->converter_disable_audio = init_params->converter_disable_audio;
|
||||||
sink->dc_container_id = NULL;
|
sink->dc_container_id = NULL;
|
||||||
|
sink->sink_id = init_params->link->ctx->dc_sink_id_count;
|
||||||
|
// increment dc_sink_id_count because we don't want two sinks with same ID
|
||||||
|
// unless they are actually the same
|
||||||
|
init_params->link->ctx->dc_sink_id_count++;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -666,9 +666,13 @@ struct dc_sink {
|
|||||||
struct dc_link *link;
|
struct dc_link *link;
|
||||||
struct dc_context *ctx;
|
struct dc_context *ctx;
|
||||||
|
|
||||||
/* private to dc_sink.c */
|
uint32_t sink_id;
|
||||||
struct kref refcount;
|
|
||||||
|
|
||||||
|
/* private to dc_sink.c */
|
||||||
|
// refcount must be the last member in dc_sink, since we want the
|
||||||
|
// sink structure to be logically cloneable up to (but not including)
|
||||||
|
// refcount
|
||||||
|
struct kref refcount;
|
||||||
};
|
};
|
||||||
|
|
||||||
void dc_sink_retain(struct dc_sink *sink);
|
void dc_sink_retain(struct dc_sink *sink);
|
||||||
|
@ -92,6 +92,7 @@ struct dc_context {
|
|||||||
bool created_bios;
|
bool created_bios;
|
||||||
struct gpio_service *gpio_service;
|
struct gpio_service *gpio_service;
|
||||||
struct i2caux *i2caux;
|
struct i2caux *i2caux;
|
||||||
|
uint32_t dc_sink_id_count;
|
||||||
uint64_t fbc_gpu_addr;
|
uint64_t fbc_gpu_addr;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user