From patchwork Tue Jun 27 03:58:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zack Rusin X-Patchwork-Id: 13293961 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 53DC2EB64D9 for ; Tue, 27 Jun 2023 03:58:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C247410E286; Tue, 27 Jun 2023 03:58:54 +0000 (UTC) Received: from letterbox.kde.org (letterbox.kde.org [46.43.1.242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6790810E281 for ; Tue, 27 Jun 2023 03:58:49 +0000 (UTC) Received: from vertex.localdomain (pool-173-49-113-140.phlapa.fios.verizon.net [173.49.113.140]) (Authenticated sender: zack) by letterbox.kde.org (Postfix) with ESMTPSA id 28FE0324915; Tue, 27 Jun 2023 04:58:47 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kde.org; s=users; t=1687838328; bh=2HdPkbfOqrJvIN0C+ct/4CqjZTYBN5DFxqzA9wRr8JU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RRQZYXOF/EOM4u0/aR+kYWUJFJASdjLkDwLOu/TCXOhTw0G54ElKENlLu7ikC8jbd OYsWXMOhQWrG4Cg5OT9g2RUz3G1Y5dqTpE/dSfpeSilrb0snpcWkb5iRb+CHK5ouLZ z/MwtfhNqSSkrwwYKoDkmsKsqNj7F6NK5izJkhp6i+jGptmwvJ+v+M2AQiGP4tPK+u fZnz6Tj4Zws3JqTaf5B5PSkte1lEBHFibeiCvr1ruEx1tTzfCuPeAJsDrF+VjvoPsF O6+iTgJnHIstxt4Ok7wM//K0tFxWrl8PNJuxk8Zkc9YJrYOgjeURLdjtNMIjj+Ersm 1FkDFUsAlJtwQ== From: Zack Rusin To: dri-devel@lists.freedesktop.org Subject: [PATCH v3 3/8] drm/vmwgfx: Use the hotspot properties from cursor planes Date: Mon, 26 Jun 2023 23:58:34 -0400 Message-Id: <20230627035839.496399-4-zack@kde.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230627035839.496399-1-zack@kde.org> References: <20230627035839.496399-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: 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: Martin Krastev Cc: Maaz Mombasawala Reviewed-by: Javier Martinez Canillas Reviewed-by: Martin Krastev --- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c index b62207be3363..de294dfe05d0 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c @@ -768,13 +768,8 @@ vmw_du_cursor_plane_atomic_update(struct drm_plane *plane, struct vmw_plane_state *old_vps = vmw_plane_state_to_vps(old_state); s32 hotspot_x, hotspot_y; - hotspot_x = du->hotspot_x; - hotspot_y = du->hotspot_y; - - if (new_state->fb) { - hotspot_x += new_state->fb->hot_x; - hotspot_y += new_state->fb->hot_y; - } + hotspot_x = du->hotspot_x + new_state->hotspot_x; + hotspot_y = du->hotspot_y + new_state->hotspot_y; du->cursor_surface = vps->surf; du->cursor_bo = vps->bo;