drm/amd/display: clean up redundant logic
Signed-off-by: Tony Cheng <tony.cheng@amd.com> Reviewed-by: Yongqiang Sun <yongqiang.sun@amd.com> Acked-by: Harry Wentland <Harry.Wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -121,26 +121,20 @@ const struct dc_surface_status *dc_surface_get_status(
|
|||||||
const struct dc_surface *dc_surface)
|
const struct dc_surface *dc_surface)
|
||||||
{
|
{
|
||||||
struct dc_surface_status *surface_status;
|
struct dc_surface_status *surface_status;
|
||||||
struct core_surface *core_surface;
|
struct core_surface *core_surface = DC_SURFACE_TO_CORE(dc_surface);;
|
||||||
struct core_dc *core_dc;
|
struct core_dc *core_dc;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (dc_surface == NULL)
|
if (!dc_surface ||
|
||||||
return NULL;
|
!core_surface->ctx ||
|
||||||
|
!core_surface->ctx->dc) {
|
||||||
core_surface = DC_SURFACE_TO_CORE(dc_surface);
|
ASSERT(0);
|
||||||
|
return NULL; /* remove this if above assert never hit */
|
||||||
if (core_surface == NULL || core_surface->ctx == NULL)
|
}
|
||||||
return NULL;
|
|
||||||
|
|
||||||
surface_status = &core_surface->status;
|
surface_status = &core_surface->status;
|
||||||
|
|
||||||
if (core_surface->ctx == NULL || core_surface->ctx->dc == NULL)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
core_dc = DC_TO_CORE(core_surface->ctx->dc);
|
core_dc = DC_TO_CORE(core_surface->ctx->dc);
|
||||||
|
|
||||||
|
|
||||||
if (core_dc->current_context == NULL)
|
if (core_dc->current_context == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
@@ -149,8 +143,7 @@ const struct dc_surface_status *dc_surface_get_status(
|
|||||||
struct pipe_ctx *pipe_ctx =
|
struct pipe_ctx *pipe_ctx =
|
||||||
&core_dc->current_context->res_ctx.pipe_ctx[i];
|
&core_dc->current_context->res_ctx.pipe_ctx[i];
|
||||||
|
|
||||||
if (pipe_ctx->surface !=
|
if (pipe_ctx->surface != core_surface)
|
||||||
DC_SURFACE_TO_CORE(dc_surface))
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
core_dc->hwss.update_pending_status(pipe_ctx);
|
core_dc->hwss.update_pending_status(pipe_ctx);
|
||||||
|
|||||||
@@ -335,7 +335,6 @@ struct dc_transfer_func *dc_create_transfer_func(void);
|
|||||||
struct dc_flip_addrs {
|
struct dc_flip_addrs {
|
||||||
struct dc_plane_address address;
|
struct dc_plane_address address;
|
||||||
bool flip_immediate;
|
bool flip_immediate;
|
||||||
/* TODO: DCC format info */
|
|
||||||
/* TODO: add flip duration for FreeSync */
|
/* TODO: add flip duration for FreeSync */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user