* [PATCH 0/4] virtio-gpu: Fixes for atomic support
@ 2016-01-13 21:52 Rob Herring
2016-01-13 21:52 ` [PATCH 1/4] drm: virtio-gpu: get the fb from the plane state for atomic updates Rob Herring
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: Rob Herring @ 2016-01-13 21:52 UTC (permalink / raw)
To: Dave Airlie; +Cc: dri-devel
Dave,
This series is the minimal changes to get virtio-gpu working with
Android DRM based hwcomposer. The first 3 patches are fixes, but I
assume they are only hit if using the atomic APIs which is dependent on
the 4th patch. I suspect async commit support is also missing, but
Android doesn't seem to need it.
I also have a few more patches for fb emulation to support panning and
mmapping the framebuffer. I'm not too sure that is really worth
supporting though.
Rob
Rob Herring (4):
drm: virtio-gpu: get the fb from the plane state for atomic updates
drm: virtio-gpu: ensure plane is flushed to host on atomic update
drm: virtio-gpu: transfer dumb buffers to host on plane update
drm: virtio-gpu: set atomic flag
drivers/gpu/drm/virtio/virtgpu_drv.c | 2 +-
drivers/gpu/drm/virtio/virtgpu_plane.c | 16 ++++++++++++++--
2 files changed, 15 insertions(+), 3 deletions(-)
--
2.5.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/4] drm: virtio-gpu: get the fb from the plane state for atomic updates
2016-01-13 21:52 [PATCH 0/4] virtio-gpu: Fixes for atomic support Rob Herring
@ 2016-01-13 21:52 ` Rob Herring
2016-01-13 21:52 ` [PATCH 2/4] drm: virtio-gpu: ensure plane is flushed to host on atomic update Rob Herring
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2016-01-13 21:52 UTC (permalink / raw)
To: Dave Airlie; +Cc: dri-devel
When using the atomic API, plane->fb is not set when calling
virtio_gpu_plane_atomic_update. Use plane->state->fb instead.
Signed-off-by: Rob Herring <robh@kernel.org>
---
drivers/gpu/drm/virtio/virtgpu_plane.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c
index 4a74129..6b9ad59 100644
--- a/drivers/gpu/drm/virtio/virtgpu_plane.c
+++ b/drivers/gpu/drm/virtio/virtgpu_plane.c
@@ -68,8 +68,8 @@ static void virtio_gpu_plane_atomic_update(struct drm_plane *plane,
struct virtio_gpu_object *bo;
uint32_t handle;
- if (plane->fb) {
- vgfb = to_virtio_gpu_framebuffer(plane->fb);
+ if (plane->state->fb) {
+ vgfb = to_virtio_gpu_framebuffer(plane->state->fb);
bo = gem_to_virtio_gpu_obj(vgfb->obj);
handle = bo->hw_res_handle;
} else {
--
2.5.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/4] drm: virtio-gpu: ensure plane is flushed to host on atomic update
2016-01-13 21:52 [PATCH 0/4] virtio-gpu: Fixes for atomic support Rob Herring
2016-01-13 21:52 ` [PATCH 1/4] drm: virtio-gpu: get the fb from the plane state for atomic updates Rob Herring
@ 2016-01-13 21:52 ` Rob Herring
2016-01-13 21:52 ` [PATCH 3/4] drm: virtio-gpu: transfer dumb buffers to host on plane update Rob Herring
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2016-01-13 21:52 UTC (permalink / raw)
To: Dave Airlie; +Cc: dri-devel
This fixes drawing updates when updating planes with atomic API.
Signed-off-by: Rob Herring <robh@kernel.org>
---
drivers/gpu/drm/virtio/virtgpu_plane.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c
index 6b9ad59..af121cf 100644
--- a/drivers/gpu/drm/virtio/virtgpu_plane.c
+++ b/drivers/gpu/drm/virtio/virtgpu_plane.c
@@ -84,6 +84,11 @@ static void virtio_gpu_plane_atomic_update(struct drm_plane *plane,
plane->state->crtc_h,
plane->state->crtc_x,
plane->state->crtc_y);
+ virtio_gpu_cmd_resource_flush(vgdev, handle,
+ plane->state->crtc_x,
+ plane->state->crtc_y,
+ plane->state->crtc_w,
+ plane->state->crtc_h);
}
--
2.5.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/4] drm: virtio-gpu: transfer dumb buffers to host on plane update
2016-01-13 21:52 [PATCH 0/4] virtio-gpu: Fixes for atomic support Rob Herring
2016-01-13 21:52 ` [PATCH 1/4] drm: virtio-gpu: get the fb from the plane state for atomic updates Rob Herring
2016-01-13 21:52 ` [PATCH 2/4] drm: virtio-gpu: ensure plane is flushed to host on atomic update Rob Herring
@ 2016-01-13 21:52 ` Rob Herring
2016-01-13 21:52 ` [PATCH 4/4] drm: virtio-gpu: set atomic flag Rob Herring
2016-02-01 19:58 ` [PATCH 0/4] virtio-gpu: Fixes for atomic support Rob Herring
4 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2016-01-13 21:52 UTC (permalink / raw)
To: Dave Airlie; +Cc: dri-devel
For dumb buffers, we need to transfer them to the host when updating a
plane.
Signed-off-by: Rob Herring <robh@kernel.org>
---
drivers/gpu/drm/virtio/virtgpu_plane.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c
index af121cf..7b6e5c5 100644
--- a/drivers/gpu/drm/virtio/virtgpu_plane.c
+++ b/drivers/gpu/drm/virtio/virtgpu_plane.c
@@ -72,6 +72,13 @@ static void virtio_gpu_plane_atomic_update(struct drm_plane *plane,
vgfb = to_virtio_gpu_framebuffer(plane->state->fb);
bo = gem_to_virtio_gpu_obj(vgfb->obj);
handle = bo->hw_res_handle;
+ if (bo->dumb) {
+ virtio_gpu_cmd_transfer_to_host_2d
+ (vgdev, handle, 0,
+ cpu_to_le32(plane->state->crtc_w),
+ cpu_to_le32(plane->state->crtc_h),
+ plane->state->crtc_x, plane->state->crtc_y, NULL);
+ }
} else {
handle = 0;
}
--
2.5.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 4/4] drm: virtio-gpu: set atomic flag
2016-01-13 21:52 [PATCH 0/4] virtio-gpu: Fixes for atomic support Rob Herring
` (2 preceding siblings ...)
2016-01-13 21:52 ` [PATCH 3/4] drm: virtio-gpu: transfer dumb buffers to host on plane update Rob Herring
@ 2016-01-13 21:52 ` Rob Herring
2016-02-01 19:58 ` [PATCH 0/4] virtio-gpu: Fixes for atomic support Rob Herring
4 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2016-01-13 21:52 UTC (permalink / raw)
To: Dave Airlie; +Cc: dri-devel
Advertise atomic mode setting capability to user space.
Signed-off-by: Rob Herring <robh@kernel.org>
---
drivers/gpu/drm/virtio/virtgpu_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.c b/drivers/gpu/drm/virtio/virtgpu_drv.c
index b40ed60..7f898cf 100644
--- a/drivers/gpu/drm/virtio/virtgpu_drv.c
+++ b/drivers/gpu/drm/virtio/virtgpu_drv.c
@@ -118,7 +118,7 @@ static const struct file_operations virtio_gpu_driver_fops = {
static struct drm_driver driver = {
- .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_PRIME | DRIVER_RENDER,
+ .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_PRIME | DRIVER_RENDER | DRIVER_ATOMIC,
.set_busid = drm_virtio_set_busid,
.load = virtio_gpu_driver_load,
.unload = virtio_gpu_driver_unload,
--
2.5.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 0/4] virtio-gpu: Fixes for atomic support
2016-01-13 21:52 [PATCH 0/4] virtio-gpu: Fixes for atomic support Rob Herring
` (3 preceding siblings ...)
2016-01-13 21:52 ` [PATCH 4/4] drm: virtio-gpu: set atomic flag Rob Herring
@ 2016-02-01 19:58 ` Rob Herring
2016-02-01 21:26 ` Dave Airlie
4 siblings, 1 reply; 7+ messages in thread
From: Rob Herring @ 2016-02-01 19:58 UTC (permalink / raw)
To: Dave Airlie; +Cc: dri-devel
On Wed, Jan 13, 2016 at 3:52 PM, Rob Herring <robh@kernel.org> wrote:
> Dave,
>
> This series is the minimal changes to get virtio-gpu working with
> Android DRM based hwcomposer. The first 3 patches are fixes, but I
> assume they are only hit if using the atomic APIs which is dependent on
> the 4th patch. I suspect async commit support is also missing, but
> Android doesn't seem to need it.
>
> I also have a few more patches for fb emulation to support panning and
> mmapping the framebuffer. I'm not too sure that is really worth
> supporting though.
>
> Rob
>
> Rob Herring (4):
> drm: virtio-gpu: get the fb from the plane state for atomic updates
> drm: virtio-gpu: ensure plane is flushed to host on atomic update
> drm: virtio-gpu: transfer dumb buffers to host on plane update
> drm: virtio-gpu: set atomic flag
>
> drivers/gpu/drm/virtio/virtgpu_drv.c | 2 +-
> drivers/gpu/drm/virtio/virtgpu_plane.c | 16 ++++++++++++++--
> 2 files changed, 15 insertions(+), 3 deletions(-)
Ping on this series.
Rob
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/4] virtio-gpu: Fixes for atomic support
2016-02-01 19:58 ` [PATCH 0/4] virtio-gpu: Fixes for atomic support Rob Herring
@ 2016-02-01 21:26 ` Dave Airlie
0 siblings, 0 replies; 7+ messages in thread
From: Dave Airlie @ 2016-02-01 21:26 UTC (permalink / raw)
To: Rob Herring; +Cc: Dave Airlie, dri-devel
On 2 February 2016 at 05:58, Rob Herring <robh@kernel.org> wrote:
> On Wed, Jan 13, 2016 at 3:52 PM, Rob Herring <robh@kernel.org> wrote:
>> Dave,
>>
>> This series is the minimal changes to get virtio-gpu working with
>> Android DRM based hwcomposer. The first 3 patches are fixes, but I
>> assume they are only hit if using the atomic APIs which is dependent on
>> the 4th patch. I suspect async commit support is also missing, but
>> Android doesn't seem to need it.
>>
>> I also have a few more patches for fb emulation to support panning and
>> mmapping the framebuffer. I'm not too sure that is really worth
>> supporting though.
>>
>> Rob
>>
>> Rob Herring (4):
>> drm: virtio-gpu: get the fb from the plane state for atomic updates
>> drm: virtio-gpu: ensure plane is flushed to host on atomic update
>> drm: virtio-gpu: transfer dumb buffers to host on plane update
>> drm: virtio-gpu: set atomic flag
>>
>> drivers/gpu/drm/virtio/virtgpu_drv.c | 2 +-
>> drivers/gpu/drm/virtio/virtgpu_plane.c | 16 ++++++++++++++--
>> 2 files changed, 15 insertions(+), 3 deletions(-)
>
> Ping on this series.
Hey,
I was going to put them in drm-next when I start doing drm-next.
I didn't think they were urgent enough for -fixes at this point.
Dave.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-02-01 21:26 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-13 21:52 [PATCH 0/4] virtio-gpu: Fixes for atomic support Rob Herring
2016-01-13 21:52 ` [PATCH 1/4] drm: virtio-gpu: get the fb from the plane state for atomic updates Rob Herring
2016-01-13 21:52 ` [PATCH 2/4] drm: virtio-gpu: ensure plane is flushed to host on atomic update Rob Herring
2016-01-13 21:52 ` [PATCH 3/4] drm: virtio-gpu: transfer dumb buffers to host on plane update Rob Herring
2016-01-13 21:52 ` [PATCH 4/4] drm: virtio-gpu: set atomic flag Rob Herring
2016-02-01 19:58 ` [PATCH 0/4] virtio-gpu: Fixes for atomic support Rob Herring
2016-02-01 21:26 ` Dave Airlie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.