OSDN Git Service

drm/ttm: clear the ttm_tt when bo->resource is NULL
authorMatthew Auld <matthew.auld@intel.com>
Mon, 30 Jan 2023 10:12:27 +0000 (10:12 +0000)
committerChristian König <christian.koenig@amd.com>
Mon, 6 Feb 2023 11:10:13 +0000 (12:10 +0100)
commit24243212c5ed2a5f3c1d1d74fd1913d8c189dec7
treeb1705b09416fddf16303895595cb507de5b7b3ab
parent58c7ee0676bace7a7aae8a3e21ec8d09eab1c895
drm/ttm: clear the ttm_tt when bo->resource is NULL

In the next few patches, when initially creating a ttm BO, the
bo->resource is NULL, and the driver is then expected to handle the
initial dummy move.  However, if this is created as a system resource
the first ttm_tt we create will always have the clear value set to
false. Previously the initial ttm_tt would be created in
ttm_bo_validate() with the clear parameter always set to true.

Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Christian König <ckoenig.leichtzumerken@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230130101230.25347-3-matthew.auld@intel.com
Acked-by: Nirmoy Das <nirmoy.das@intel.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
drivers/gpu/drm/ttm/ttm_bo.c