disp: msm: dp: fix dsc resource bookkeeping for mst

DP driver maintains the number of allocated DSCs per stream for managing
the availability of DSC blocks for each stream. In the current driver,
if there are errors in the disable path, it is possible for the refcount
to go negative thereby affecting the availability of DSC blocks in
subsequent enables.

This change fixes the refcount logic by making sure the DSC count in the
context correctly reflects the usage.

Change-Id: Id595ec87c186ddb3ed300e1390384f367ef79148
Signed-off-by: Sandeep Gangadharaiah <sandgang@codeaurora.org>
This commit is contained in:
Sandeep Gangadharaiah
2021-02-04 00:27:28 -05:00
parent 23734fc295
commit ed103ed1ef
2 changed files with 37 additions and 34 deletions

View File

@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
* Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
*/
#ifndef _DP_PANEL_H_
@@ -135,7 +135,7 @@ struct dp_panel {
u32 channel_total_slots;
u32 pbn;
u32 tot_dsc_blks_in_use;
u32 dsc_blks_in_use;
/* DRM connector assosiated with this panel */
struct drm_connector *connector;