diff mbox series

[6/7] drm/tegra: vic: Track interface version

Message ID 20180517154132.10058-7-thierry.reding@gmail.com
State Deferred
Headers show
Series drm/tegra: Preparation work for destaging ABI | expand

Commit Message

Thierry Reding May 17, 2018, 3:41 p.m. UTC
From: Thierry Reding <treding@nvidia.com>

Set the interface version implemented by the VIC module. This allows
userspace to pass the correct command stream when programming the VIC
module.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 drivers/gpu/drm/tegra/vic.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Dmitry Osipenko May 18, 2018, 4:05 p.m. UTC | #1
On 17.05.2018 18:41, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
> 
> Set the interface version implemented by the VIC module. This allows
> userspace to pass the correct command stream when programming the VIC
> module.
> 
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
>  drivers/gpu/drm/tegra/vic.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/gpu/drm/tegra/vic.c b/drivers/gpu/drm/tegra/vic.c
> index f5794dd49f3b..d739403045aa 100644
> --- a/drivers/gpu/drm/tegra/vic.c
> +++ b/drivers/gpu/drm/tegra/vic.c
> @@ -25,6 +25,7 @@
>  
>  struct vic_config {
>  	const char *firmware;
> +	unsigned int version;
>  };
>  
>  struct vic {
> @@ -264,18 +265,21 @@ static const struct tegra_drm_client_ops vic_ops = {
>  
>  static const struct vic_config vic_t124_config = {
>  	.firmware = NVIDIA_TEGRA_124_VIC_FIRMWARE,
> +	.version = 0x40,
>  };
>  
>  #define NVIDIA_TEGRA_210_VIC_FIRMWARE "nvidia/tegra210/vic04_ucode.bin"
>  
>  static const struct vic_config vic_t210_config = {
>  	.firmware = NVIDIA_TEGRA_210_VIC_FIRMWARE,
> +	.version = 0x21,
>  };
>  
>  #define NVIDIA_TEGRA_186_VIC_FIRMWARE "nvidia/tegra186/vic04_ucode.bin"
>  
>  static const struct vic_config vic_t186_config = {
>  	.firmware = NVIDIA_TEGRA_186_VIC_FIRMWARE,
> +	.version = 0x18,
>  };
>  
>  static const struct of_device_id vic_match[] = {
> @@ -337,6 +341,7 @@ static int vic_probe(struct platform_device *pdev)
>  	vic->client.base.ops = &vic_client_ops;
>  	vic->client.base.dev = dev;
>  	vic->client.base.class = HOST1X_CLASS_VIC;
> +	vic->client.base.version = vic->config->version;
>  	vic->client.base.syncpts = syncpts;
>  	vic->client.base.num_syncpts = 1;
>  	vic->dev = dev;
> 

Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox series

Patch

diff --git a/drivers/gpu/drm/tegra/vic.c b/drivers/gpu/drm/tegra/vic.c
index f5794dd49f3b..d739403045aa 100644
--- a/drivers/gpu/drm/tegra/vic.c
+++ b/drivers/gpu/drm/tegra/vic.c
@@ -25,6 +25,7 @@ 
 
 struct vic_config {
 	const char *firmware;
+	unsigned int version;
 };
 
 struct vic {
@@ -264,18 +265,21 @@  static const struct tegra_drm_client_ops vic_ops = {
 
 static const struct vic_config vic_t124_config = {
 	.firmware = NVIDIA_TEGRA_124_VIC_FIRMWARE,
+	.version = 0x40,
 };
 
 #define NVIDIA_TEGRA_210_VIC_FIRMWARE "nvidia/tegra210/vic04_ucode.bin"
 
 static const struct vic_config vic_t210_config = {
 	.firmware = NVIDIA_TEGRA_210_VIC_FIRMWARE,
+	.version = 0x21,
 };
 
 #define NVIDIA_TEGRA_186_VIC_FIRMWARE "nvidia/tegra186/vic04_ucode.bin"
 
 static const struct vic_config vic_t186_config = {
 	.firmware = NVIDIA_TEGRA_186_VIC_FIRMWARE,
+	.version = 0x18,
 };
 
 static const struct of_device_id vic_match[] = {
@@ -337,6 +341,7 @@  static int vic_probe(struct platform_device *pdev)
 	vic->client.base.ops = &vic_client_ops;
 	vic->client.base.dev = dev;
 	vic->client.base.class = HOST1X_CLASS_VIC;
+	vic->client.base.version = vic->config->version;
 	vic->client.base.syncpts = syncpts;
 	vic->client.base.num_syncpts = 1;
 	vic->dev = dev;