[PATCH] drm/i915/gvt: add sprite plane flip done support.
Zhenyu Wang
zhenyuw at linux.intel.com
Tue Feb 14 09:08:38 UTC 2017
On 2017.02.14 14:50:47 +0800, Xu Han wrote:
> * Add flip done event support for sprite plane on SKL platform.
> * Fix bug #1452, "Call Trace:handle_default_event_virt+0xef/0x100
> [i915]" while booting up guest.
>
> Signed-off-by: Xu Han <xu.han at intel.com>
> ---
Applied. Thanks!
> drivers/gpu/drm/i915/gvt/cmd_parser.c | 20 +++++++++++++++++++-
> drivers/gpu/drm/i915/gvt/interrupt.c | 4 ++++
> 2 files changed, 23 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/gvt/cmd_parser.c b/drivers/gpu/drm/i915/gvt/cmd_parser.c
> index e456398..7a5d7f5 100644
> --- a/drivers/gpu/drm/i915/gvt/cmd_parser.c
> +++ b/drivers/gpu/drm/i915/gvt/cmd_parser.c
> @@ -1134,6 +1134,8 @@ static int skl_decode_mi_display_flip(struct parser_exec_state *s,
> u32 dword2 = cmd_val(s, 2);
> u32 plane = (dword0 & GENMASK(12, 8)) >> 8;
>
> + info->plane = PRIMARY_PLANE;
> +
> switch (plane) {
> case MI_DISPLAY_FLIP_SKL_PLANE_1_A:
> info->pipe = PIPE_A;
> @@ -1147,12 +1149,28 @@ static int skl_decode_mi_display_flip(struct parser_exec_state *s,
> info->pipe = PIPE_C;
> info->event = PRIMARY_C_FLIP_DONE;
> break;
> +
> + case MI_DISPLAY_FLIP_SKL_PLANE_2_A:
> + info->pipe = PIPE_A;
> + info->event = SPRITE_A_FLIP_DONE;
> + info->plane = SPRITE_PLANE;
> + break;
> + case MI_DISPLAY_FLIP_SKL_PLANE_2_B:
> + info->pipe = PIPE_B;
> + info->event = SPRITE_B_FLIP_DONE;
> + info->plane = SPRITE_PLANE;
> + break;
> + case MI_DISPLAY_FLIP_SKL_PLANE_2_C:
> + info->pipe = PIPE_C;
> + info->event = SPRITE_C_FLIP_DONE;
> + info->plane = SPRITE_PLANE;
> + break;
> +
> default:
> gvt_err("unknown plane code %d\n", plane);
> return -EINVAL;
> }
>
> - info->pipe = PRIMARY_PLANE;
> info->stride_val = (dword1 & GENMASK(15, 6)) >> 6;
> info->tile_val = (dword1 & GENMASK(2, 0));
> info->surf_val = (dword2 & GENMASK(31, 12)) >> 12;
> diff --git a/drivers/gpu/drm/i915/gvt/interrupt.c b/drivers/gpu/drm/i915/gvt/interrupt.c
> index af0b86b..92bb247 100644
> --- a/drivers/gpu/drm/i915/gvt/interrupt.c
> +++ b/drivers/gpu/drm/i915/gvt/interrupt.c
> @@ -588,6 +588,10 @@ static void gen8_init_irq(
> SET_BIT_INFO(irq, 3, PRIMARY_A_FLIP_DONE, INTEL_GVT_IRQ_INFO_DE_PIPE_A);
> SET_BIT_INFO(irq, 3, PRIMARY_B_FLIP_DONE, INTEL_GVT_IRQ_INFO_DE_PIPE_B);
> SET_BIT_INFO(irq, 3, PRIMARY_C_FLIP_DONE, INTEL_GVT_IRQ_INFO_DE_PIPE_C);
> +
> + SET_BIT_INFO(irq, 4, SPRITE_A_FLIP_DONE, INTEL_GVT_IRQ_INFO_DE_PIPE_A);
> + SET_BIT_INFO(irq, 4, SPRITE_B_FLIP_DONE, INTEL_GVT_IRQ_INFO_DE_PIPE_B);
> + SET_BIT_INFO(irq, 4, SPRITE_C_FLIP_DONE, INTEL_GVT_IRQ_INFO_DE_PIPE_C);
> }
>
> /* GEN8 interrupt PCU events */
> --
> 1.9.1
>
> _______________________________________________
> intel-gvt-dev mailing list
> intel-gvt-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev
--
Open Source Technology Center, Intel ltd.
$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 163 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gvt-dev/attachments/20170214/01ca1291/attachment.sig>
More information about the intel-gvt-dev
mailing list