Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpu: host1x: Rename "parent" to "host"

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>

+23 -23
+3 -3
drivers/gpu/drm/tegra/dc.c
··· 1996 1996 1997 1997 static int tegra_dc_init(struct host1x_client *client) 1998 1998 { 1999 - struct drm_device *drm = dev_get_drvdata(client->parent); 1999 + struct drm_device *drm = dev_get_drvdata(client->host); 2000 2000 unsigned long flags = HOST1X_SYNCPT_CLIENT_MANAGED; 2001 2001 struct tegra_dc *dc = host1x_client_to_dc(client); 2002 2002 struct tegra_drm *tegra = drm->dev_private; ··· 2077 2077 2078 2078 /* 2079 2079 * Inherit the DMA parameters (such as maximum segment size) from the 2080 - * parent device. 2080 + * parent host1x device. 2081 2081 */ 2082 - client->dev->dma_parms = client->parent->dma_parms; 2082 + client->dev->dma_parms = client->host->dma_parms; 2083 2083 2084 2084 return 0; 2085 2085
+2 -2
drivers/gpu/drm/tegra/drm.c
··· 905 905 int host1x_client_iommu_attach(struct host1x_client *client) 906 906 { 907 907 struct iommu_domain *domain = iommu_get_domain_for_dev(client->dev); 908 - struct drm_device *drm = dev_get_drvdata(client->parent); 908 + struct drm_device *drm = dev_get_drvdata(client->host); 909 909 struct tegra_drm *tegra = drm->dev_private; 910 910 struct iommu_group *group = NULL; 911 911 int err; ··· 941 941 942 942 void host1x_client_iommu_detach(struct host1x_client *client) 943 943 { 944 - struct drm_device *drm = dev_get_drvdata(client->parent); 944 + struct drm_device *drm = dev_get_drvdata(client->host); 945 945 struct tegra_drm *tegra = drm->dev_private; 946 946 struct iommu_domain *domain; 947 947
+1 -1
drivers/gpu/drm/tegra/dsi.c
··· 1030 1030 1031 1031 static int tegra_dsi_init(struct host1x_client *client) 1032 1032 { 1033 - struct drm_device *drm = dev_get_drvdata(client->parent); 1033 + struct drm_device *drm = dev_get_drvdata(client->host); 1034 1034 struct tegra_dsi *dsi = host1x_client_to_dsi(client); 1035 1035 int err; 1036 1036
+2 -2
drivers/gpu/drm/tegra/gr2d.c
··· 34 34 static int gr2d_init(struct host1x_client *client) 35 35 { 36 36 struct tegra_drm_client *drm = host1x_to_drm_client(client); 37 - struct drm_device *dev = dev_get_drvdata(client->parent); 37 + struct drm_device *dev = dev_get_drvdata(client->host); 38 38 unsigned long flags = HOST1X_SYNCPT_HAS_BASE; 39 39 struct gr2d *gr2d = to_gr2d(drm); 40 40 int err; ··· 76 76 static int gr2d_exit(struct host1x_client *client) 77 77 { 78 78 struct tegra_drm_client *drm = host1x_to_drm_client(client); 79 - struct drm_device *dev = dev_get_drvdata(client->parent); 79 + struct drm_device *dev = dev_get_drvdata(client->host); 80 80 struct tegra_drm *tegra = dev->dev_private; 81 81 struct gr2d *gr2d = to_gr2d(drm); 82 82 int err;
+2 -2
drivers/gpu/drm/tegra/gr3d.c
··· 43 43 static int gr3d_init(struct host1x_client *client) 44 44 { 45 45 struct tegra_drm_client *drm = host1x_to_drm_client(client); 46 - struct drm_device *dev = dev_get_drvdata(client->parent); 46 + struct drm_device *dev = dev_get_drvdata(client->host); 47 47 unsigned long flags = HOST1X_SYNCPT_HAS_BASE; 48 48 struct gr3d *gr3d = to_gr3d(drm); 49 49 int err; ··· 85 85 static int gr3d_exit(struct host1x_client *client) 86 86 { 87 87 struct tegra_drm_client *drm = host1x_to_drm_client(client); 88 - struct drm_device *dev = dev_get_drvdata(client->parent); 88 + struct drm_device *dev = dev_get_drvdata(client->host); 89 89 struct gr3d *gr3d = to_gr3d(drm); 90 90 int err; 91 91
+1 -1
drivers/gpu/drm/tegra/hdmi.c
··· 1424 1424 1425 1425 static int tegra_hdmi_init(struct host1x_client *client) 1426 1426 { 1427 - struct drm_device *drm = dev_get_drvdata(client->parent); 1428 1427 struct tegra_hdmi *hdmi = host1x_client_to_hdmi(client); 1428 + struct drm_device *drm = dev_get_drvdata(client->host); 1429 1429 int err; 1430 1430 1431 1431 hdmi->output.dev = client->dev;
+2 -2
drivers/gpu/drm/tegra/hub.c
··· 705 705 static int tegra_display_hub_init(struct host1x_client *client) 706 706 { 707 707 struct tegra_display_hub *hub = to_tegra_display_hub(client); 708 - struct drm_device *drm = dev_get_drvdata(client->parent); 708 + struct drm_device *drm = dev_get_drvdata(client->host); 709 709 struct tegra_drm *tegra = drm->dev_private; 710 710 struct tegra_display_hub_state *state; 711 711 ··· 723 723 724 724 static int tegra_display_hub_exit(struct host1x_client *client) 725 725 { 726 - struct drm_device *drm = dev_get_drvdata(client->parent); 726 + struct drm_device *drm = dev_get_drvdata(client->host); 727 727 struct tegra_drm *tegra = drm->dev_private; 728 728 729 729 drm_atomic_private_obj_fini(&tegra->hub->base);
+1 -1
drivers/gpu/drm/tegra/sor.c
··· 3053 3053 3054 3054 static int tegra_sor_init(struct host1x_client *client) 3055 3055 { 3056 - struct drm_device *drm = dev_get_drvdata(client->parent); 3056 + struct drm_device *drm = dev_get_drvdata(client->host); 3057 3057 const struct drm_encoder_helper_funcs *helpers = NULL; 3058 3058 struct tegra_sor *sor = host1x_client_to_sor(client); 3059 3059 int connector = DRM_MODE_CONNECTOR_Unknown;
+4 -4
drivers/gpu/drm/tegra/vic.c
··· 161 161 static int vic_init(struct host1x_client *client) 162 162 { 163 163 struct tegra_drm_client *drm = host1x_to_drm_client(client); 164 - struct drm_device *dev = dev_get_drvdata(client->parent); 164 + struct drm_device *dev = dev_get_drvdata(client->host); 165 165 struct tegra_drm *tegra = dev->dev_private; 166 166 struct vic *vic = to_vic(drm); 167 167 int err; ··· 190 190 191 191 /* 192 192 * Inherit the DMA parameters (such as maximum segment size) from the 193 - * parent device. 193 + * parent host1x device. 194 194 */ 195 - client->dev->dma_parms = client->parent->dma_parms; 195 + client->dev->dma_parms = client->host->dma_parms; 196 196 197 197 return 0; 198 198 ··· 209 209 static int vic_exit(struct host1x_client *client) 210 210 { 211 211 struct tegra_drm_client *drm = host1x_to_drm_client(client); 212 - struct drm_device *dev = dev_get_drvdata(client->parent); 212 + struct drm_device *dev = dev_get_drvdata(client->host); 213 213 struct tegra_drm *tegra = dev->dev_private; 214 214 struct vic *vic = to_vic(drm); 215 215 int err;
+2 -2
drivers/gpu/host1x/bus.c
··· 120 120 mutex_lock(&device->clients_lock); 121 121 list_move_tail(&client->list, &device->clients); 122 122 list_move_tail(&subdev->list, &device->active); 123 - client->parent = &device->dev; 123 + client->host = &device->dev; 124 124 subdev->client = client; 125 125 mutex_unlock(&device->clients_lock); 126 126 mutex_unlock(&device->subdevs_lock); ··· 156 156 */ 157 157 mutex_lock(&device->clients_lock); 158 158 subdev->client = NULL; 159 - client->parent = NULL; 159 + client->host = NULL; 160 160 list_move_tail(&subdev->list, &device->subdevs); 161 161 /* 162 162 * XXX: Perhaps don't do this here, but rather explicitly remove it
+1 -1
drivers/gpu/host1x/syncpt.c
··· 421 421 struct host1x_syncpt *host1x_syncpt_request(struct host1x_client *client, 422 422 unsigned long flags) 423 423 { 424 - struct host1x *host = dev_get_drvdata(client->parent->parent); 424 + struct host1x *host = dev_get_drvdata(client->host->parent); 425 425 426 426 return host1x_syncpt_alloc(host, client, flags); 427 427 }
+2 -2
include/linux/host1x.h
··· 33 33 /** 34 34 * struct host1x_client - host1x client structure 35 35 * @list: list node for the host1x client 36 - * @parent: pointer to struct device representing the host1x controller 36 + * @host: pointer to struct device representing the host1x controller 37 37 * @dev: pointer to struct device backing this host1x client 38 38 * @group: IOMMU group that this client is a member of 39 39 * @ops: host1x client operations ··· 44 44 */ 45 45 struct host1x_client { 46 46 struct list_head list; 47 - struct device *parent; 47 + struct device *host; 48 48 struct device *dev; 49 49 struct iommu_group *group; 50 50