]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/client: Rename _force to _locked
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 4 Feb 2020 15:01:44 +0000 (16:01 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 11 Feb 2020 14:03:08 +0000 (15:03 +0100)
Plus extend the kerneldoc a bit to explain how this should be used.
With the previous patch to drop the force restore the main user of
this function is not emphasis on the "I hold the internal master lock
already" aspect, so rename the function to match.

Suggested by Noralf.

Cc: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
Tested-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200204150146.2006481-4-daniel.vetter@ffwll.ch
drivers/gpu/drm/drm_client_modeset.c
drivers/gpu/drm/drm_fb_helper.c
include/drm/drm_client.h

index 895b73f23079a7838cc926ab1e1728d88de13f71..4f03be9b2a836d561f929a1879ec0a1c9075de9e 100644 (file)
@@ -1022,15 +1022,17 @@ out:
 }
 
 /**
- * drm_client_modeset_commit_force() - Force commit CRTC configuration
+ * drm_client_modeset_commit_locked() - Force commit CRTC configuration
  * @client: DRM client
  *
- * Commit modeset configuration to crtcs without checking if there is a DRM master.
+ * Commit modeset configuration to crtcs without checking if there is a DRM
+ * master. The assumption is that the caller already holds an internal DRM
+ * master reference acquired with drm_master_internal_acquire().
  *
  * Returns:
  * Zero on success or negative error code on failure.
  */
-int drm_client_modeset_commit_force(struct drm_client_dev *client)
+int drm_client_modeset_commit_locked(struct drm_client_dev *client)
 {
        struct drm_device *dev = client->dev;
        int ret;
@@ -1044,7 +1046,7 @@ int drm_client_modeset_commit_force(struct drm_client_dev *client)
 
        return ret;
 }
-EXPORT_SYMBOL(drm_client_modeset_commit_force);
+EXPORT_SYMBOL(drm_client_modeset_commit_locked);
 
 /**
  * drm_client_modeset_commit() - Commit CRTC configuration
@@ -1063,7 +1065,7 @@ int drm_client_modeset_commit(struct drm_client_dev *client)
        if (!drm_master_internal_acquire(dev))
                return -EBUSY;
 
-       ret = drm_client_modeset_commit_force(client);
+       ret = drm_client_modeset_commit_locked(client);
 
        drm_master_internal_release(dev);
 
index 936a66e501e7994c38662166da677479a0ea9f38..f47454df0780080036a0094f83db6a24cd83a22f 100644 (file)
@@ -284,7 +284,7 @@ static bool drm_fb_helper_force_kernel_mode(void)
                        continue;
 
                mutex_lock(&helper->lock);
-               ret = drm_client_modeset_commit_force(&helper->client);
+               ret = drm_client_modeset_commit_locked(&helper->client);
                if (ret)
                        error = true;
                mutex_unlock(&helper->lock);
@@ -1342,7 +1342,7 @@ static int pan_display_atomic(struct fb_var_screeninfo *var,
 
        pan_set(fb_helper, var->xoffset, var->yoffset);
 
-       ret = drm_client_modeset_commit_force(&fb_helper->client);
+       ret = drm_client_modeset_commit_locked(&fb_helper->client);
        if (!ret) {
                info->var.xoffset = var->xoffset;
                info->var.yoffset = var->yoffset;
index d01d311023accd841ef94c9cdcaf8262152e1d05..3ed5dee899fd16af8f3facdcc585e1e93ee47abd 100644 (file)
@@ -161,7 +161,7 @@ int drm_client_modeset_create(struct drm_client_dev *client);
 void drm_client_modeset_free(struct drm_client_dev *client);
 int drm_client_modeset_probe(struct drm_client_dev *client, unsigned int width, unsigned int height);
 bool drm_client_rotation(struct drm_mode_set *modeset, unsigned int *rotation);
-int drm_client_modeset_commit_force(struct drm_client_dev *client);
+int drm_client_modeset_commit_locked(struct drm_client_dev *client);
 int drm_client_modeset_commit(struct drm_client_dev *client);
 int drm_client_modeset_dpms(struct drm_client_dev *client, int mode);