From: Charlene Liu <charlene....@amd.com>

[why]
dc->config.disable_dmcu set to true, but it still need create
dmcub based abm.

[how]
check to dc->caps.dmcub_support check.


Reviewed-by: Aric Cyr <aric....@amd.com>
Acked-by: Solomon Chiu <solomon.c...@amd.com>
Signed-off-by: Charlene Liu <charlene....@amd.com>
---
 drivers/gpu/drm/amd/display/dc/dce/dmub_abm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dce/dmub_abm.c 
b/drivers/gpu/drm/amd/display/dc/dce/dmub_abm.c
index 0f273ac0c83f..6ab81d609c97 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dmub_abm.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dmub_abm.c
@@ -256,7 +256,7 @@ struct abm *dmub_abm_create(
        const struct dce_abm_shift *abm_shift,
        const struct dce_abm_mask *abm_mask)
 {
-       if (!ctx->dc->config.disable_dmcu) {
+       if (ctx->dc->caps.dmcub_support) {
                struct dce_abm *abm_dce = kzalloc(sizeof(*abm_dce), GFP_KERNEL);
 
                if (abm_dce == NULL) {
-- 
2.25.1

Reply via email to