Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1063425rda; Mon, 23 Oct 2023 00:48:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG79IMoXaXhnvROnD7s0sPFy82DEgb8ilYLpMh2MpQsjZ4wooptQ6dzut6Rj44dY0amWQlK X-Received: by 2002:a17:903:1210:b0:1c7:245a:7fea with SMTP id l16-20020a170903121000b001c7245a7feamr10638306plh.58.1698047302591; Mon, 23 Oct 2023 00:48:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698047302; cv=none; d=google.com; s=arc-20160816; b=dEuRjpqNR911+OJzQMyOYNuuIKQwTwZpsMDkWmKYLCcFhyAyw7Euzg22ZP5diq7KVx mMpvqooRmPHiTjicEGKWMpJhf8EiWgJU7LDczfGBnLpivwySVgfPSfnWDX98HBS0h7FN y6bg7lwNFlrivGo66m/2FhgkMlgbK/L2SWjGI5bJFZalTkdZviyS6/KExwnY1vwmcIln VLCz3FVPeQMVAhsMI/bpU3Vh7ftkkKpyL/5aOnlliGDaZxez/Ih5KTXT+OUZuowsNToZ LdFbYzlv+hdZTOpR8ys7XiUIlE91oozL9dJt7i5KSh8BuVF9lz59kdW/SB39cYhHqoxn oOcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vlB5NNBc9uQkf+X7NN8+WEA3je5xbSkk2BMonKhyqZE=; fh=iOXPein6KwI+xNW54ixGY+J1K3GvRcpk6m8klmMMdY0=; b=SyNaFnuMNyQsZaYoEWCplFPIkWXarJEx2AQOowKJZcMVEU8UB2w4i3pidezHxu2FJu J39P0dSy/pFGV7naG3pdlN6+BC7bqXI6NNQV5aP4HszcGQjV00C6V+x0VQ4b3ypFKSH/ VPM5jLelt/gHYaX2XDRS9PCB09UPP8tUpCcsxrJgdCkTEPJEJTIhdZB6SblK/dLfjb// yfllFaIABxV3TTW+DNG+Vkq09pxY7MvPP9rOybp3dASpor+Wa9P/kgRV9LYOZ1FIr8CR ngdDHWOFRhZr6oPw/6a/fdh1bEU1hpNIXuvH3QePPRbV6wkMByAvHAb2HUlA9eZsVZ1M z59A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KOHzmfE9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id j17-20020a170902c3d100b001c45291b6ebsi5835887plj.272.2023.10.23.00.48.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 00:48:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KOHzmfE9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 04EAB80942F1; Mon, 23 Oct 2023 00:48:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233610AbjJWHrp (ORCPT + 99 others); Mon, 23 Oct 2023 03:47:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233589AbjJWHrd (ORCPT ); Mon, 23 Oct 2023 03:47:33 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56BEFD65 for ; Mon, 23 Oct 2023 00:46:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698047207; 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=vlB5NNBc9uQkf+X7NN8+WEA3je5xbSkk2BMonKhyqZE=; b=KOHzmfE9dSbcOkonPW3HtBEuA34d1Dd/cb6nbzPgMXqmcWyLg1Vmo7MGFJyNu0Q6NoK2F4 TJCNPULcyOcM1o6fAOhsDQ0puBUhaKjGqUdmMLvaJrconHbF+rBp2ZYL2hU6Iwe5Y/J5/d jRqgxFPCye/D+KFa+hDVsGCLsExGLgM= 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-654-5uhUS5UqP52zSmAzteZbEw-1; Mon, 23 Oct 2023 03:46:37 -0400 X-MC-Unique: 5uhUS5UqP52zSmAzteZbEw-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 038F180171C; Mon, 23 Oct 2023 07:46:36 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.45.225.243]) by smtp.corp.redhat.com (Postfix) with ESMTP id 45EC6170EF; Mon, 23 Oct 2023 07:46:31 +0000 (UTC) From: Albert Esteve To: qemu-devel@nongnu.org Cc: zackr@vmware.com, contact@emersion.fr, linux-doc@vger.kernel.org, dri-devel@lists.freedesktop.org, Maxime Ripard , iforbes@vmware.com, Maarten Lankhorst , Chia-I Wu , Thomas Zimmermann , Hans de Goede , Matt Roper , David Airlie , banackm@vmware.com, Rob Clark , javierm@redhat.com, krastevm@vmware.com, spice-devel@lists.freedesktop.org, Gurchetan Singh , Jonathan Corbet , David Airlie , virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, mombasawalam@vmware.com, Daniel Vetter , ppaalanen@gmail.com, VMware Graphics Reviewers , Gerd Hoffmann Subject: [PATCH v6 3/9] drm/vmwgfx: Use the hotspot properties from cursor planes Date: Mon, 23 Oct 2023 09:46:07 +0200 Message-ID: <20231023074613.41327-4-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-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 23 Oct 2023 00:48:19 -0700 (PDT) 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: 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 818b7f109f538..bea0abc3d4188 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; -- 2.41.0