do not set crtc in vc4_output_set_mode 70/271570/2
authorChangyeon Lee <cyeon.lee@samsung.com>
Wed, 23 Feb 2022 05:53:41 +0000 (14:53 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Wed, 23 Feb 2022 06:00:16 +0000 (15:00 +0900)
setting crtc is done in _tdm_vc4_display_commit_layer or
_vc4_output_make_atomic_request.
setting crtc is unnecessary in vc4_output_set_mode.
and if drm has capability of atomic commit,
setting crtc with extra buffer is not needed.
this patch makes to reduce gem memory usage.

Change-Id: I410e725671e73b56ae705a46b3e3c2ae53b42cb9

src/libhal-backend-tdm-vc4/tdm_vc4_display.c

index 1c10338..5a712b5 100644 (file)
@@ -1807,13 +1807,6 @@ vc4_output_set_mode(hal_tdm_output *output, const hal_tdm_output_mode *mode)
        TDM_BACKEND_INFO("Set the output mode: %s, %d, %d, %d, %d, %d",
                         mode->name, mode->hdisplay, mode->vdisplay, mode->vrefresh, mode->flags, mode->type);
 
-       ret = _tdm_vc4_display_set_crtc(output_data->display_data, output_data, 1);
-       if (ret != HAL_TDM_ERROR_NONE) {
-               TDM_BACKEND_ERR("fail to set crtc.");
-               return HAL_TDM_ERROR_OPERATION_FAILED;
-       }
-       output_data->crtc_enabled = 1;
-
        return HAL_TDM_ERROR_NONE;
 }