From f0cd3e3c74e8ff0a0bc43e3ea1c457ca0991e8aa Mon Sep 17 00:00:00 2001 From: jsg Date: Mon, 7 Oct 2024 05:02:58 +0000 Subject: [PATCH] drm/amd/display: Add null check for set_output_gamma in dcn30_set_output_transfer_func From Srinivasan Shanmugam ddf9ff244d704e1903533f7be377615ed34b83e7 in linux-6.6.y/6.6.54 08ae395ea22fb3d9b318c8bde28c0dfd2f5fa4d2 in mainline linux --- sys/dev/pci/drm/amd/display/dc/dcn30/dcn30_hwseq.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/dev/pci/drm/amd/display/dc/dcn30/dcn30_hwseq.c b/sys/dev/pci/drm/amd/display/dc/dcn30/dcn30_hwseq.c index ba47a1c8eec..d59af329d00 100644 --- a/sys/dev/pci/drm/amd/display/dc/dcn30/dcn30_hwseq.c +++ b/sys/dev/pci/drm/amd/display/dc/dcn30/dcn30_hwseq.c @@ -214,7 +214,11 @@ bool dcn30_set_output_transfer_func(struct dc *dc, } } - mpc->funcs->set_output_gamma(mpc, mpcc_id, params); + if (mpc->funcs->set_output_gamma) + mpc->funcs->set_output_gamma(mpc, mpcc_id, params); + else + DC_LOG_ERROR("%s: set_output_gamma function pointer is NULL.\n", __func__); + return ret; } -- 2.20.1