diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2013-03-22 10:34:09 -0400 |
---|---|---|
committer | Thierry Reding <thierry.reding@avionic-design.de> | 2013-04-22 06:40:04 -0400 |
commit | d43f81cbaf43531a977e8b4c4427f19acf8a5061 (patch) | |
tree | 76fbf323c5df37de5a29f52817ddc4953328d213 /drivers/gpu/host1x/drm/drm.h | |
parent | de2ba664c30fcdb0f678ab6cbb57e01a0b206085 (diff) |
drm/tegra: Add gr2d device
Add client driver for 2D device, and IOCTLs to pass work to host1x
channel for 2D.
Also adds functions that can be called to access sync points from
DRM.
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
Tested-by: Thierry Reding <thierry.reding@avionic-design.de>
Tested-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Diffstat (limited to 'drivers/gpu/host1x/drm/drm.h')
-rw-r--r-- | drivers/gpu/host1x/drm/drm.h | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/drivers/gpu/host1x/drm/drm.h b/drivers/gpu/host1x/drm/drm.h index 3864a39f8ad3..02ce020f2575 100644 --- a/drivers/gpu/host1x/drm/drm.h +++ b/drivers/gpu/host1x/drm/drm.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2012 Avionic Design GmbH | 2 | * Copyright (C) 2012 Avionic Design GmbH |
3 | * Copyright (C) 2012 NVIDIA CORPORATION. All rights reserved. | 3 | * Copyright (C) 2012-2013 NVIDIA CORPORATION. All rights reserved. |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License version 2 as | 6 | * it under the terms of the GNU General Public License version 2 as |
@@ -15,6 +15,9 @@ | |||
15 | #include <drm/drm_edid.h> | 15 | #include <drm/drm_edid.h> |
16 | #include <drm/drm_fb_helper.h> | 16 | #include <drm/drm_fb_helper.h> |
17 | #include <drm/drm_fixed.h> | 17 | #include <drm/drm_fixed.h> |
18 | #include <uapi/drm/tegra_drm.h> | ||
19 | |||
20 | #include "host1x.h" | ||
18 | 21 | ||
19 | struct tegra_fb { | 22 | struct tegra_fb { |
20 | struct drm_framebuffer base; | 23 | struct drm_framebuffer base; |
@@ -47,9 +50,25 @@ struct host1x_drm { | |||
47 | 50 | ||
48 | struct host1x_client; | 51 | struct host1x_client; |
49 | 52 | ||
53 | struct host1x_drm_context { | ||
54 | struct host1x_client *client; | ||
55 | struct host1x_channel *channel; | ||
56 | struct list_head list; | ||
57 | }; | ||
58 | |||
50 | struct host1x_client_ops { | 59 | struct host1x_client_ops { |
51 | int (*drm_init)(struct host1x_client *client, struct drm_device *drm); | 60 | int (*drm_init)(struct host1x_client *client, struct drm_device *drm); |
52 | int (*drm_exit)(struct host1x_client *client); | 61 | int (*drm_exit)(struct host1x_client *client); |
62 | int (*open_channel)(struct host1x_client *client, | ||
63 | struct host1x_drm_context *context); | ||
64 | void (*close_channel)(struct host1x_drm_context *context); | ||
65 | int (*submit)(struct host1x_drm_context *context, | ||
66 | struct drm_tegra_submit *args, struct drm_device *drm, | ||
67 | struct drm_file *file); | ||
68 | }; | ||
69 | |||
70 | struct host1x_drm_file { | ||
71 | struct list_head contexts; | ||
53 | }; | 72 | }; |
54 | 73 | ||
55 | struct host1x_client { | 74 | struct host1x_client { |
@@ -58,6 +77,12 @@ struct host1x_client { | |||
58 | 77 | ||
59 | const struct host1x_client_ops *ops; | 78 | const struct host1x_client_ops *ops; |
60 | 79 | ||
80 | enum host1x_class class; | ||
81 | struct host1x_channel *channel; | ||
82 | |||
83 | struct host1x_syncpt **syncpts; | ||
84 | unsigned int num_syncpts; | ||
85 | |||
61 | struct list_head list; | 86 | struct list_head list; |
62 | }; | 87 | }; |
63 | 88 | ||