Commit 2671075b authored by Thomas Zimmermann's avatar Thomas Zimmermann

drm/gma500: Rename psb_gtt_{pin,unpin}() to psb_gem_{pin,unpin}()

Rename psb_gtt_pin() to psb_gem_pin() to reflect the semantics of the
function. Same for psb_gtt_unpin(). No functional changes.
Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Acked-by: default avatarPatrik Jakobsson <patrik.r.jakobsson@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211015084053.13708-6-tzimmermann@suse.de
parent 957a2d0e
...@@ -52,7 +52,7 @@ static void psb_gtt_detach_pages(struct gtt_range *gt) ...@@ -52,7 +52,7 @@ static void psb_gtt_detach_pages(struct gtt_range *gt)
gt->pages = NULL; gt->pages = NULL;
} }
int psb_gtt_pin(struct gtt_range *gt) int psb_gem_pin(struct gtt_range *gt)
{ {
int ret = 0; int ret = 0;
struct drm_device *dev = gt->gem.dev; struct drm_device *dev = gt->gem.dev;
...@@ -80,7 +80,7 @@ int psb_gtt_pin(struct gtt_range *gt) ...@@ -80,7 +80,7 @@ int psb_gtt_pin(struct gtt_range *gt)
return ret; return ret;
} }
void psb_gtt_unpin(struct gtt_range *gt) void psb_gem_unpin(struct gtt_range *gt)
{ {
struct drm_device *dev = gt->gem.dev; struct drm_device *dev = gt->gem.dev;
struct drm_psb_private *dev_priv = to_drm_psb_private(dev); struct drm_psb_private *dev_priv = to_drm_psb_private(dev);
...@@ -105,7 +105,7 @@ static void psb_gtt_free_range(struct drm_device *dev, struct gtt_range *gt) ...@@ -105,7 +105,7 @@ static void psb_gtt_free_range(struct drm_device *dev, struct gtt_range *gt)
{ {
/* Undo the mmap pin if we are destroying the object */ /* Undo the mmap pin if we are destroying the object */
if (gt->mmapping) { if (gt->mmapping) {
psb_gtt_unpin(gt); psb_gem_unpin(gt);
gt->mmapping = 0; gt->mmapping = 0;
} }
WARN_ON(gt->in_gart && !gt->stolen); WARN_ON(gt->in_gart && !gt->stolen);
...@@ -301,7 +301,7 @@ static vm_fault_t psb_gem_fault(struct vm_fault *vmf) ...@@ -301,7 +301,7 @@ static vm_fault_t psb_gem_fault(struct vm_fault *vmf)
/* For now the mmap pins the object and it stays pinned. As things /* For now the mmap pins the object and it stays pinned. As things
stand that will do us no harm */ stand that will do us no harm */
if (r->mmapping == 0) { if (r->mmapping == 0) {
err = psb_gtt_pin(r); err = psb_gem_pin(r);
if (err < 0) { if (err < 0) {
dev_err(dev->dev, "gma500: pin failed: %d\n", err); dev_err(dev->dev, "gma500: pin failed: %d\n", err);
ret = vmf_error(err); ret = vmf_error(err);
......
...@@ -15,7 +15,7 @@ struct drm_device; ...@@ -15,7 +15,7 @@ struct drm_device;
struct gtt_range * struct gtt_range *
psb_gem_create(struct drm_device *dev, u64 size, const char *name, bool stolen, u32 align); psb_gem_create(struct drm_device *dev, u64 size, const char *name, bool stolen, u32 align);
int psb_gtt_pin(struct gtt_range *gt); int psb_gem_pin(struct gtt_range *gt);
void psb_gtt_unpin(struct gtt_range *gt); void psb_gem_unpin(struct gtt_range *gt);
#endif #endif
...@@ -75,7 +75,7 @@ int gma_pipe_set_base(struct drm_crtc *crtc, int x, int y, ...@@ -75,7 +75,7 @@ int gma_pipe_set_base(struct drm_crtc *crtc, int x, int y,
/* We are displaying this buffer, make sure it is actually loaded /* We are displaying this buffer, make sure it is actually loaded
into the GTT */ into the GTT */
ret = psb_gtt_pin(gtt); ret = psb_gem_pin(gtt);
if (ret < 0) if (ret < 0)
goto gma_pipe_set_base_exit; goto gma_pipe_set_base_exit;
start = gtt->offset; start = gtt->offset;
...@@ -126,7 +126,7 @@ int gma_pipe_set_base(struct drm_crtc *crtc, int x, int y, ...@@ -126,7 +126,7 @@ int gma_pipe_set_base(struct drm_crtc *crtc, int x, int y,
gma_pipe_cleaner: gma_pipe_cleaner:
/* If there was a previous display we can now unpin it */ /* If there was a previous display we can now unpin it */
if (old_fb) if (old_fb)
psb_gtt_unpin(to_gtt_range(old_fb->obj[0])); psb_gem_unpin(to_gtt_range(old_fb->obj[0]));
gma_pipe_set_base_exit: gma_pipe_set_base_exit:
gma_power_end(dev); gma_power_end(dev);
...@@ -350,7 +350,7 @@ int gma_crtc_cursor_set(struct drm_crtc *crtc, ...@@ -350,7 +350,7 @@ int gma_crtc_cursor_set(struct drm_crtc *crtc,
/* Unpin the old GEM object */ /* Unpin the old GEM object */
if (gma_crtc->cursor_obj) { if (gma_crtc->cursor_obj) {
gt = to_gtt_range(gma_crtc->cursor_obj); gt = to_gtt_range(gma_crtc->cursor_obj);
psb_gtt_unpin(gt); psb_gem_unpin(gt);
drm_gem_object_put(gma_crtc->cursor_obj); drm_gem_object_put(gma_crtc->cursor_obj);
gma_crtc->cursor_obj = NULL; gma_crtc->cursor_obj = NULL;
} }
...@@ -378,7 +378,7 @@ int gma_crtc_cursor_set(struct drm_crtc *crtc, ...@@ -378,7 +378,7 @@ int gma_crtc_cursor_set(struct drm_crtc *crtc,
gt = to_gtt_range(obj); gt = to_gtt_range(obj);
/* Pin the memory into the GTT */ /* Pin the memory into the GTT */
ret = psb_gtt_pin(gt); ret = psb_gem_pin(gt);
if (ret) { if (ret) {
dev_err(dev->dev, "Can not pin down handle 0x%x\n", handle); dev_err(dev->dev, "Can not pin down handle 0x%x\n", handle);
goto unref_cursor; goto unref_cursor;
...@@ -426,7 +426,7 @@ int gma_crtc_cursor_set(struct drm_crtc *crtc, ...@@ -426,7 +426,7 @@ int gma_crtc_cursor_set(struct drm_crtc *crtc,
/* unpin the old bo */ /* unpin the old bo */
if (gma_crtc->cursor_obj) { if (gma_crtc->cursor_obj) {
gt = to_gtt_range(gma_crtc->cursor_obj); gt = to_gtt_range(gma_crtc->cursor_obj);
psb_gtt_unpin(gt); psb_gem_unpin(gt);
drm_gem_object_put(gma_crtc->cursor_obj); drm_gem_object_put(gma_crtc->cursor_obj);
} }
...@@ -490,7 +490,7 @@ void gma_crtc_disable(struct drm_crtc *crtc) ...@@ -490,7 +490,7 @@ void gma_crtc_disable(struct drm_crtc *crtc)
if (crtc->primary->fb) { if (crtc->primary->fb) {
gt = to_gtt_range(crtc->primary->fb->obj[0]); gt = to_gtt_range(crtc->primary->fb->obj[0]);
psb_gtt_unpin(gt); psb_gem_unpin(gt);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment