]> git.baikalelectronics.ru Git - kernel.git/commitdiff
gpu: host1x: Rename "parent" to "host"
authorThierry Reding <treding@nvidia.com>
Mon, 2 Dec 2019 09:51:58 +0000 (10:51 +0100)
committerThierry Reding <treding@nvidia.com>
Fri, 10 Jan 2020 15:37:38 +0000 (16:37 +0100)
Rename the host1x clients' parent to "host" because that more closely
describes what it is. The parent can be confused with the parent device
in terms of the device hierarchy. Subsequent patches will add a new
member that refers to the parent in that hierarchy.

Signed-off-by: Thierry Reding <treding@nvidia.com>
12 files changed:
drivers/gpu/drm/tegra/dc.c
drivers/gpu/drm/tegra/drm.c
drivers/gpu/drm/tegra/dsi.c
drivers/gpu/drm/tegra/gr2d.c
drivers/gpu/drm/tegra/gr3d.c
drivers/gpu/drm/tegra/hdmi.c
drivers/gpu/drm/tegra/hub.c
drivers/gpu/drm/tegra/sor.c
drivers/gpu/drm/tegra/vic.c
drivers/gpu/host1x/bus.c
drivers/gpu/host1x/syncpt.c
include/linux/host1x.h

index 714af052fbefe3c880fae5bf045a09d3dab14c4f..471bdf504df1a6602a0fe3dc4f947bec21853cca 100644 (file)
@@ -1996,7 +1996,7 @@ static bool tegra_dc_has_window_groups(struct tegra_dc *dc)
 
 static int tegra_dc_init(struct host1x_client *client)
 {
-       struct drm_device *drm = dev_get_drvdata(client->parent);
+       struct drm_device *drm = dev_get_drvdata(client->host);
        unsigned long flags = HOST1X_SYNCPT_CLIENT_MANAGED;
        struct tegra_dc *dc = host1x_client_to_dc(client);
        struct tegra_drm *tegra = drm->dev_private;
@@ -2077,9 +2077,9 @@ static int tegra_dc_init(struct host1x_client *client)
 
        /*
         * Inherit the DMA parameters (such as maximum segment size) from the
-        * parent device.
+        * parent host1x device.
         */
-       client->dev->dma_parms = client->parent->dma_parms;
+       client->dev->dma_parms = client->host->dma_parms;
 
        return 0;
 
index f455ce71e85d9c6bff84388815caa87f9a22409b..aa9e49f04988724986cebfbc77166647888f286f 100644 (file)
@@ -905,7 +905,7 @@ int tegra_drm_unregister_client(struct tegra_drm *tegra,
 int host1x_client_iommu_attach(struct host1x_client *client)
 {
        struct iommu_domain *domain = iommu_get_domain_for_dev(client->dev);
-       struct drm_device *drm = dev_get_drvdata(client->parent);
+       struct drm_device *drm = dev_get_drvdata(client->host);
        struct tegra_drm *tegra = drm->dev_private;
        struct iommu_group *group = NULL;
        int err;
@@ -941,7 +941,7 @@ int host1x_client_iommu_attach(struct host1x_client *client)
 
 void host1x_client_iommu_detach(struct host1x_client *client)
 {
-       struct drm_device *drm = dev_get_drvdata(client->parent);
+       struct drm_device *drm = dev_get_drvdata(client->host);
        struct tegra_drm *tegra = drm->dev_private;
        struct iommu_domain *domain;
 
index a5d47e301c5f7d1ed045fbbad1aff17524cebb2d..ec475d022fa0b8ced4a3e3078d4bf6dcdb6c4f58 100644 (file)
@@ -1030,7 +1030,7 @@ static const struct drm_encoder_helper_funcs tegra_dsi_encoder_helper_funcs = {
 
 static int tegra_dsi_init(struct host1x_client *client)
 {
-       struct drm_device *drm = dev_get_drvdata(client->parent);
+       struct drm_device *drm = dev_get_drvdata(client->host);
        struct tegra_dsi *dsi = host1x_client_to_dsi(client);
        int err;
 
index 1fc4e56c7cc5a15a75ee28a0074025ff929d1148..48363f744bb9aef5cf147c1a609280e913c1f1ec 100644 (file)
@@ -34,7 +34,7 @@ static inline struct gr2d *to_gr2d(struct tegra_drm_client *client)
 static int gr2d_init(struct host1x_client *client)
 {
        struct tegra_drm_client *drm = host1x_to_drm_client(client);
-       struct drm_device *dev = dev_get_drvdata(client->parent);
+       struct drm_device *dev = dev_get_drvdata(client->host);
        unsigned long flags = HOST1X_SYNCPT_HAS_BASE;
        struct gr2d *gr2d = to_gr2d(drm);
        int err;
@@ -76,7 +76,7 @@ put:
 static int gr2d_exit(struct host1x_client *client)
 {
        struct tegra_drm_client *drm = host1x_to_drm_client(client);
-       struct drm_device *dev = dev_get_drvdata(client->parent);
+       struct drm_device *dev = dev_get_drvdata(client->host);
        struct tegra_drm *tegra = dev->dev_private;
        struct gr2d *gr2d = to_gr2d(drm);
        int err;
index 24fae0f64032d9bef824ad141836069355a5f3f4..c0a528be03692ce155a73153985645ba4ce95e06 100644 (file)
@@ -43,7 +43,7 @@ static inline struct gr3d *to_gr3d(struct tegra_drm_client *client)
 static int gr3d_init(struct host1x_client *client)
 {
        struct tegra_drm_client *drm = host1x_to_drm_client(client);
-       struct drm_device *dev = dev_get_drvdata(client->parent);
+       struct drm_device *dev = dev_get_drvdata(client->host);
        unsigned long flags = HOST1X_SYNCPT_HAS_BASE;
        struct gr3d *gr3d = to_gr3d(drm);
        int err;
@@ -85,7 +85,7 @@ put:
 static int gr3d_exit(struct host1x_client *client)
 {
        struct tegra_drm_client *drm = host1x_to_drm_client(client);
-       struct drm_device *dev = dev_get_drvdata(client->parent);
+       struct drm_device *dev = dev_get_drvdata(client->host);
        struct gr3d *gr3d = to_gr3d(drm);
        int err;
 
index 50269ffbcb6ba2b6739ed9b5025ba1d4daff9cec..38bf1d16095ffca99eccfa9ca48d73181e884f0f 100644 (file)
@@ -1424,8 +1424,8 @@ static const struct drm_encoder_helper_funcs tegra_hdmi_encoder_helper_funcs = {
 
 static int tegra_hdmi_init(struct host1x_client *client)
 {
-       struct drm_device *drm = dev_get_drvdata(client->parent);
        struct tegra_hdmi *hdmi = host1x_client_to_hdmi(client);
+       struct drm_device *drm = dev_get_drvdata(client->host);
        int err;
 
        hdmi->output.dev = client->dev;
index 47d985ac7cd7861e285ac75b1ca01df7b16961d9..7d9e1309be3b544e4e254cd94fdb071b1dda62ec 100644 (file)
@@ -705,7 +705,7 @@ void tegra_display_hub_atomic_commit(struct drm_device *drm,
 static int tegra_display_hub_init(struct host1x_client *client)
 {
        struct tegra_display_hub *hub = to_tegra_display_hub(client);
-       struct drm_device *drm = dev_get_drvdata(client->parent);
+       struct drm_device *drm = dev_get_drvdata(client->host);
        struct tegra_drm *tegra = drm->dev_private;
        struct tegra_display_hub_state *state;
 
@@ -723,7 +723,7 @@ static int tegra_display_hub_init(struct host1x_client *client)
 
 static int tegra_display_hub_exit(struct host1x_client *client)
 {
-       struct drm_device *drm = dev_get_drvdata(client->parent);
+       struct drm_device *drm = dev_get_drvdata(client->host);
        struct tegra_drm *tegra = drm->dev_private;
 
        drm_atomic_private_obj_fini(&tegra->hub->base);
index a68d3b36b9724bb7ad71c88fee388486751590fb..956bf5d680adc64c2a4146c7b3b095f9bf11b64a 100644 (file)
@@ -3053,7 +3053,7 @@ static const struct tegra_sor_ops tegra_sor_dp_ops = {
 
 static int tegra_sor_init(struct host1x_client *client)
 {
-       struct drm_device *drm = dev_get_drvdata(client->parent);
+       struct drm_device *drm = dev_get_drvdata(client->host);
        const struct drm_encoder_helper_funcs *helpers = NULL;
        struct tegra_sor *sor = host1x_client_to_sor(client);
        int connector = DRM_MODE_CONNECTOR_Unknown;
index 3526c2892ddb2e2506fbda41ce46fdc258d251ed..ade56b860cf9de7155d390b1ef04dc5293590262 100644 (file)
@@ -161,7 +161,7 @@ static int vic_boot(struct vic *vic)
 static int vic_init(struct host1x_client *client)
 {
        struct tegra_drm_client *drm = host1x_to_drm_client(client);
-       struct drm_device *dev = dev_get_drvdata(client->parent);
+       struct drm_device *dev = dev_get_drvdata(client->host);
        struct tegra_drm *tegra = dev->dev_private;
        struct vic *vic = to_vic(drm);
        int err;
@@ -190,9 +190,9 @@ static int vic_init(struct host1x_client *client)
 
        /*
         * Inherit the DMA parameters (such as maximum segment size) from the
-        * parent device.
+        * parent host1x device.
         */
-       client->dev->dma_parms = client->parent->dma_parms;
+       client->dev->dma_parms = client->host->dma_parms;
 
        return 0;
 
@@ -209,7 +209,7 @@ detach:
 static int vic_exit(struct host1x_client *client)
 {
        struct tegra_drm_client *drm = host1x_to_drm_client(client);
-       struct drm_device *dev = dev_get_drvdata(client->parent);
+       struct drm_device *dev = dev_get_drvdata(client->host);
        struct tegra_drm *tegra = dev->dev_private;
        struct vic *vic = to_vic(drm);
        int err;
index 2c8559ff3481fe54ad32edde2c7eb1ab78f938c4..50d500345d0497df021e273edeb0926138727799 100644 (file)
@@ -120,7 +120,7 @@ static void host1x_subdev_register(struct host1x_device *device,
        mutex_lock(&device->clients_lock);
        list_move_tail(&client->list, &device->clients);
        list_move_tail(&subdev->list, &device->active);
-       client->parent = &device->dev;
+       client->host = &device->dev;
        subdev->client = client;
        mutex_unlock(&device->clients_lock);
        mutex_unlock(&device->subdevs_lock);
@@ -156,7 +156,7 @@ static void __host1x_subdev_unregister(struct host1x_device *device,
         */
        mutex_lock(&device->clients_lock);
        subdev->client = NULL;
-       client->parent = NULL;
+       client->host = NULL;
        list_move_tail(&subdev->list, &device->subdevs);
        /*
         * XXX: Perhaps don't do this here, but rather explicitly remove it
index dd1cd0142941c4b1adf712e86ad49e1fcc89bfc5..fce7892d513796b8f2dadb9c52da1cee49f894d1 100644 (file)
@@ -421,7 +421,7 @@ int host1x_syncpt_init(struct host1x *host)
 struct host1x_syncpt *host1x_syncpt_request(struct host1x_client *client,
                                            unsigned long flags)
 {
-       struct host1x *host = dev_get_drvdata(client->parent->parent);
+       struct host1x *host = dev_get_drvdata(client->host->parent);
 
        return host1x_syncpt_alloc(host, client, flags);
 }
index 6f8d772591ba798c7e53117fa48f2a724325f134..b673d6198e05a8096d46e5bff8cd69b52e71d683 100644 (file)
@@ -33,7 +33,7 @@ struct host1x_client_ops {
 /**
  * struct host1x_client - host1x client structure
  * @list: list node for the host1x client
- * @parent: pointer to struct device representing the host1x controller
+ * @host: pointer to struct device representing the host1x controller
  * @dev: pointer to struct device backing this host1x client
  * @group: IOMMU group that this client is a member of
  * @ops: host1x client operations
@@ -44,7 +44,7 @@ struct host1x_client_ops {
  */
 struct host1x_client {
        struct list_head list;
-       struct device *parent;
+       struct device *host;
        struct device *dev;
        struct iommu_group *group;