[Why]
There's some unnecessary mem allocation for CS_TFM_ID. What's worse, it
depends on LUT size and since it's 4K for CS_TFM_1D, it is 16x bigger
than in regular case when it's actually needed. This leads to some
crashes in stress conditions.
[How]
Skip ramp combining designed for RGB256 and DXGI gamma with CS_TFM_1D.
Signed-off-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
 
        output_tf->type = TF_TYPE_DISTRIBUTED_POINTS;
 
-       if (ramp && (mapUserRamp || ramp->type != GAMMA_RGB_256)) {
+       if (ramp && ramp->type != GAMMA_CS_TFM_1D &&
+                       (mapUserRamp || ramp->type != GAMMA_RGB_256)) {
                rgb_user = kvcalloc(ramp->num_entries + _EXTRA_POINTS,
                            sizeof(*rgb_user),
                            GFP_KERNEL);