From patchwork Wed Jul 19 01:42:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zack Rusin X-Patchwork-Id: 13318052 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 CD9BEEB64DD for ; Wed, 19 Jul 2023 01:42:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6070C10E3F1; Wed, 19 Jul 2023 01:42:40 +0000 (UTC) Received: from letterbox.kde.org (letterbox.kde.org [46.43.1.242]) by gabe.freedesktop.org (Postfix) with ESMTPS id C5E2910E0BF for ; Wed, 19 Jul 2023 01:42:34 +0000 (UTC) Received: from vertex.vmware.com (pool-173-49-113-140.phlapa.fios.verizon.net [173.49.113.140]) (Authenticated sender: zack) by letterbox.kde.org (Postfix) with ESMTPSA id 902433262AD; Wed, 19 Jul 2023 02:42:32 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kde.org; s=users; t=1689730953; bh=N5cwHdI6M95RDVh89UJsg+VEuuNlJteezYnhe7c8m+0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FbPn76dDTxpQ0UzxtrptcKEc8P9QrJGdjKBaDAg4vXRLLUb5iNHpciVP+Ru4Vcfzm QKRpdsgdGxqBGQS1yG0biP206Dm+aj3DXYd4Mkdw40U4TXMbbh1iOOZSpnaH881SDJ Bm2R7MnUUcd1GxRRS15JV07dBmXJO9gJBPqoLLlCrAfx3//0SdwAz+DvOw//qMPy90 sK/QqaiyUjvF6t58f0jQU4+NQ+vd02/88NiG3hP5E8E5KQQTB7VYYjvP3NX1PZ1w0u 5KGfOmaq3a31EQODFrHfUmECpEqqHmQIjEYMJ/ZMssAe+0tqqHUua5E+1Qths8kvmw i4rMfEOOIZuYQ== From: Zack Rusin To: dri-devel@lists.freedesktop.org Subject: [PATCH v5 5/9] drm/vboxvideo: Use the hotspot properties from cursor planes Date: Tue, 18 Jul 2023 21:42:14 -0400 Message-Id: <20230719014218.1700057-6-zack@kde.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230719014218.1700057-1-zack@kde.org> References: <20230719014218.1700057-1-zack@kde.org> MIME-Version: 1.0 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: , Reply-To: Zack Rusin Cc: Hans de Goede , David Airlie , javierm@redhat.com, banackm@vmware.com, krastevm@vmware.com, ppaalanen@gmail.com, iforbes@vmware.com, mombasawalam@vmware.com 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 341edd982cb3..9ff3bade9795 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);