Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1063497rda; Mon, 23 Oct 2023 00:48:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEz9RFl2sNaA9NAeTmVFkqnLLAd2nDVZUm5Ovjq8klHo8yh0VZnz8Vao1AiunisJGxwGbot X-Received: by 2002:a05:6a00:990:b0:690:c887:8cd8 with SMTP id u16-20020a056a00099000b00690c8878cd8mr7241201pfg.32.1698047316463; Mon, 23 Oct 2023 00:48:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698047316; cv=none; d=google.com; s=arc-20160816; b=XQGdpmuYQh6EK6fJf8y4dCuj7dVa0VzLNLipnrb5Y67obbrDRVtDAfUhzEaKHNdnB1 N1KaYtopjpX/nx121Ud3DP2GzvONR5pE8LpbJlobDwZ36yEq9E8ktwqLWbWiSHTHWFFD KU13XxjGWiDnMR9wdhGSKWApfVajKX1fnUt7cQoS3RG+Dh7uoZkWM3Xvam+kbZbM7Wau TAyFHgLPZdkHRkK897SX1t5VCuRuTUElJTam2aU906/eitJDhCfFs5Qgq5MuobbHD0TL m7gdbo9evm+OEcHikd5SVIIc2J/zqTOxEZz+VFsw85qmoy3DWkNRaE7QCD3h2dEDPJCm +5Wg== 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=2ig9pnbkXsw6GzlEEjdjTDGad5diacA6zlPvo0RK13g=; fh=vGLQdWbpzZe7oKOugS+L+NqUjyMNya86JerJ9EiAn2A=; b=JZOGW5sOaNHOOV+FPP05x1KRC0Tihu68nqwTM+SAQM1XQ/nw5VGmn5b7oaxtBKa5QP IVcF1z9ZEMsLR3gaQffY6+cn2+aeqdy65Vbxvw8zBKPwjhKnY5kbpcEEreGvcH255Rpv Jfz3C0cMNAHkJwQzHmiFQfdu/MXtpnN6UJ0+qYMRqJbAFD0klQ2OAd1QDpB4V3oI/7k7 ufT3vpxFhmhb7TITUsSgY38etr5tv9u4lD5pNs93caN5YkzfUDKW5viGZPHyLZEzMW+4 eFh+FxwEi2aeHfDzqX59LXhp0ytSXMZnc9beNbMr5ops+0MP+jtv3iBhKj9Wieh8AUZ1 jNNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=E3FW5ffH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id q13-20020a65624d000000b005af9c2da8aasi5857707pgv.631.2023.10.23.00.48.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 00:48:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=E3FW5ffH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (Postfix) with ESMTP id 36FC38050020; Mon, 23 Oct 2023 00:48:34 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233707AbjJWHsX (ORCPT + 99 others); Mon, 23 Oct 2023 03:48:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233627AbjJWHsF (ORCPT ); Mon, 23 Oct 2023 03:48:05 -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 A4330D7D for ; Mon, 23 Oct 2023 00:47:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698047233; 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=E3FW5ffHrd5LGP18THnG/o0E+aZz2TQY1omiI5R6tWSyWt+e/OnspSEl/VWFCArffc8Iim zKxaKCynSybpwGWiE59RccXzlf1YTaLYzQHaSAPVxpz7HvNDeLUjtxKZCb8BT9ePGHWdmC 6FKdVIyJN2jJ8wE1T33ZqVm8TDa8xf4= 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 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 , David Airlie 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-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 morse.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 (morse.vger.email [0.0.0.0]); Mon, 23 Oct 2023 00:48:34 -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: 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