Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9dd3074f authored by Kalyan Thota's avatar Kalyan Thota Committed by Gerrit - the friendly Code Review server
Browse files

drm/msm: add import flag when buffer is imported



Add the buffer object flag appropriately for both
immediate import and delayed import case.

Change-Id: Iedbad2dcc93214324be11a4f0a70e1da6d042884
Signed-off-by: default avatarKalyan Thota <kalyant@codeaurora.org>
parent 8c63eb9b
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -1218,10 +1218,15 @@ struct drm_gem_object *msm_gem_import(struct drm_device *dev,
	msm_obj->sgt = sgt;
	msm_obj->pages = NULL;
	/*
	 * If sg table is NULL, user should call msm_gem_delayed_import to add
	 * back the sg table to the drm gem object
	 * 1) If sg table is NULL, user should call msm_gem_delayed_import
	 * to add back the sg table to the drm gem object.
	 *
	 * 2) Add buffer flag unconditionally for all import cases.
	 *    # Cached buffer will be attached immediately hence sgt will
	 *      be available upon gem obj creation.
	 *    # Un-cached buffer will follow delayed attach hence sgt
	 *      will be NULL upon gem obj creation.
	 */
	if (!sgt)
	msm_obj->flags |= MSM_BO_EXTBUF;

	/*