drm/msm: fb prepare/cleanup
Atomic wants to split the prepare/pin from where we actually program the scanout address (so that any part that can fail is done synchronously). Add some fb/gem apis to make this easier to use from the kms parts. Signed-off-by: Rob Clark <robdclark@gmail.com>
This commit is contained in:
@@ -309,6 +309,7 @@ int msm_gem_get_iova_locked(struct drm_gem_object *obj, int id,
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* get iova, taking a reference. Should have a matching put */
|
||||
int msm_gem_get_iova(struct drm_gem_object *obj, int id, uint32_t *iova)
|
||||
{
|
||||
struct msm_gem_object *msm_obj = to_msm_bo(obj);
|
||||
@@ -328,6 +329,16 @@ int msm_gem_get_iova(struct drm_gem_object *obj, int id, uint32_t *iova)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* get iova without taking a reference, used in places where you have
|
||||
* already done a 'msm_gem_get_iova()'.
|
||||
*/
|
||||
uint32_t msm_gem_iova(struct drm_gem_object *obj, int id)
|
||||
{
|
||||
struct msm_gem_object *msm_obj = to_msm_bo(obj);
|
||||
WARN_ON(!msm_obj->domain[id].iova);
|
||||
return msm_obj->domain[id].iova;
|
||||
}
|
||||
|
||||
void msm_gem_put_iova(struct drm_gem_object *obj, int id)
|
||||
{
|
||||
// XXX TODO ..
|
||||
|
Reference in New Issue
Block a user