From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 797A4CDB474 for ; Mon, 23 Oct 2023 07:47:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5D6BB10E162; Mon, 23 Oct 2023 07:47:09 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id DBBA410E159 for ; Mon, 23 Oct 2023 07:47:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698047226; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2ig9pnbkXsw6GzlEEjdjTDGad5diacA6zlPvo0RK13g=; b=ZoDl8feOn4Xr1Y1YItCF6uiIo2exZiUuwRTWb4MNhbAHz99Wj5qSqnGzUItEXE1TYvkOip W5DI271YT5DeIPt7yGHK2J/G+4tCt6IhB3otxz9l/LQHH5RFYRYWqUzqXDSpVSu0JmCrdu dqRz85DATSZbWwwSwfi736NkswP2b2g= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-76-TyA4BC3iMWuf9jc7i8bRww-1; Mon, 23 Oct 2023 03:47:02 -0400 X-MC-Unique: TyA4BC3iMWuf9jc7i8bRww-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 09FBD857CF1; Mon, 23 Oct 2023 07:46:46 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.45.225.243]) by smtp.corp.redhat.com (Postfix) with ESMTP id 398B11120F; Mon, 23 Oct 2023 07:46:41 +0000 (UTC) From: Albert Esteve To: qemu-devel@nongnu.org Subject: [PATCH v6 5/9] drm/vboxvideo: Use the hotspot properties from cursor planes Date: Mon, 23 Oct 2023 09:46:09 +0200 Message-ID: <20231023074613.41327-6-aesteve@redhat.com> In-Reply-To: <20231023074613.41327-1-aesteve@redhat.com> References: <20231023074613.41327-1-aesteve@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-doc@vger.kernel.org, David Airlie , banackm@vmware.com, virtualization@lists.linux-foundation.org, Gerd Hoffmann , mombasawalam@vmware.com, iforbes@vmware.com, Jonathan Corbet , javierm@redhat.com, VMware Graphics Reviewers , David Airlie , Maxime Ripard , Hans de Goede , ppaalanen@gmail.com, dri-devel@lists.freedesktop.org, spice-devel@lists.freedesktop.org, Gurchetan Singh , Matt Roper , linux-kernel@vger.kernel.org, krastevm@vmware.com, Thomas Zimmermann Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Zack Rusin Atomic modesetting got support for mouse hotspots via the hotspot properties. Port the legacy kms hotspot handling to the new properties on cursor planes. Signed-off-by: Zack Rusin Cc: Hans de Goede Cc: David Airlie Cc: Daniel Vetter Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/vboxvideo/vbox_mode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/vboxvideo/vbox_mode.c b/drivers/gpu/drm/vboxvideo/vbox_mode.c index 341edd982cb3b..9ff3bade97957 100644 --- a/drivers/gpu/drm/vboxvideo/vbox_mode.c +++ b/drivers/gpu/drm/vboxvideo/vbox_mode.c @@ -429,8 +429,8 @@ static void vbox_cursor_atomic_update(struct drm_plane *plane, flags = VBOX_MOUSE_POINTER_VISIBLE | VBOX_MOUSE_POINTER_SHAPE | VBOX_MOUSE_POINTER_ALPHA; hgsmi_update_pointer_shape(vbox->guest_pool, flags, - min_t(u32, max(fb->hot_x, 0), width), - min_t(u32, max(fb->hot_y, 0), height), + min_t(u32, max(new_state->hotspot_x, 0), width), + min_t(u32, max(new_state->hotspot_y, 0), height), width, height, vbox->cursor_data, data_size); mutex_unlock(&vbox->hw_mutex); -- 2.41.0