Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1063361rda; Mon, 23 Oct 2023 00:48:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFC+kE04W0TMcGmNH0K5PZllt+n0mP2KoTy+bLIqypg3UPpTU8hbwfrnmOWeL3hXEPn7KuC X-Received: by 2002:a05:6a20:3d07:b0:159:c07d:66f0 with SMTP id y7-20020a056a203d0700b00159c07d66f0mr11419605pzi.6.1698047289337; Mon, 23 Oct 2023 00:48:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698047289; cv=none; d=google.com; s=arc-20160816; b=yR82E3YICLPFFwYTEqtsXqFlggQrEdVK2kJCdsJwHWVggqWcs9kKzNjx+1Ei4dP+xW WAFM8pi9hlHBQNJLtgw1YW0a85abTuoF2Dtt70NdWRFFuzRJDNYoRbNHAFahOmPc/XXx J9Jm20/gszj0WiD6Be3VP9U6qSxj9glR8Piu6rPU3pwy1ihP18twg/sGVuqPN4+z0j0m 8Wx6wmT+u/hZKuDeQCvz14LXUNlHlq7hn0CLNYBvlIqsQIN89a3JBxUUAFMlB0z0S/eD p4goeyCzG7ODwYEW43eMrVpjZbcTyAtp/oVfvfLp64nH5LKV58R2ulGfmRdoLA2V4Yfw 2H4w== 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=pm5AJQT4ZR4lNVtsmA024I9/ZkwIPN6rBQ2nDY0rX4w=; fh=vGLQdWbpzZe7oKOugS+L+NqUjyMNya86JerJ9EiAn2A=; b=tP0rCq82C9ZCVSblR2MKPjSEwd8GAU4bLa2hiGvuauSSZi7m56HU33tQXmQ1EcHBOl BSL1Factu1IW9aMd5hyB1jMgFdCuyd9PjRyt0ldpBGdVMF3nHPEv0dBiAGV6KNsOlMbJ n/cvkttdSyHlA7nktP5uMlgYuBAdcErgyeiQ88Jar8THfMen1gndoViNx6c3NRBPEt0V IkzDT/4U+J2ezJDIc02R7Zj5BqW2ED/Gh+xIsoGyQcWBI5wT0Qe3Nrt3B9D0fqvTKNzO vEeSLa9NmRTdpdiUkwmMFUQ2fIk96TG0/D0eLLo9TY9q47WP6N652jEv2Peajdc0hrqy EWmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="NMYUIO/v"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id f68-20020a625147000000b006b95a166f2esi5972232pfb.364.2023.10.23.00.48.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 00:48:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="NMYUIO/v"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id 9399280ACB67; Mon, 23 Oct 2023 00:48:06 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233672AbjJWHsA (ORCPT + 99 others); Mon, 23 Oct 2023 03:48:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233621AbjJWHrt (ORCPT ); Mon, 23 Oct 2023 03:47:49 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F898D7A for ; Mon, 23 Oct 2023 00:46:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698047218; 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=pm5AJQT4ZR4lNVtsmA024I9/ZkwIPN6rBQ2nDY0rX4w=; b=NMYUIO/vj/m8BD3Ii7TzSaBnXY7ZmlSqvQXGA5ja5UtxASbuilsAodjn5DL10CKfj0l7gQ 8s4SioAuEwicNh/ThBLp9/STiZde7/GzNiEAnD38okiLXH56e1sR2b7BflI2sHXz5btG25 h308EwDyldHIFgozNVQZWWGbPycof18= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-439-wvTWb6zpPVOeM-FEuSC8Pw-1; Mon, 23 Oct 2023 03:46:52 -0400 X-MC-Unique: wvTWb6zpPVOeM-FEuSC8Pw-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 1EEB91C06E26; Mon, 23 Oct 2023 07:46:51 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.45.225.243]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5282C503B; Mon, 23 Oct 2023 07:46:46 +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 6/9] drm/virtio: Use the hotspot properties from cursor planes Date: Mon, 23 Oct 2023 09:46:10 +0200 Message-ID: <20231023074613.41327-7-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=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Mon, 23 Oct 2023 00:48:06 -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 Reviewed-by: Gerd Hoffmann Cc: David Airlie Cc: Gurchetan Singh Cc: Chia-I Wu Cc: Daniel Vetter Cc: virtualization@lists.linux-foundation.org Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/virtio/virtgpu_plane.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c index a2e045f3a0004..20de599658c1f 100644 --- a/drivers/gpu/drm/virtio/virtgpu_plane.c +++ b/drivers/gpu/drm/virtio/virtgpu_plane.c @@ -323,16 +323,16 @@ static void virtio_gpu_cursor_plane_update(struct drm_plane *plane, DRM_DEBUG("update, handle %d, pos +%d+%d, hot %d,%d\n", handle, plane->state->crtc_x, plane->state->crtc_y, - plane->state->fb ? plane->state->fb->hot_x : 0, - plane->state->fb ? plane->state->fb->hot_y : 0); + plane->state->hotspot_x, + plane->state->hotspot_y); output->cursor.hdr.type = cpu_to_le32(VIRTIO_GPU_CMD_UPDATE_CURSOR); output->cursor.resource_id = cpu_to_le32(handle); if (plane->state->fb) { output->cursor.hot_x = - cpu_to_le32(plane->state->fb->hot_x); + cpu_to_le32(plane->state->hotspot_x); output->cursor.hot_y = - cpu_to_le32(plane->state->fb->hot_y); + cpu_to_le32(plane->state->hotspot_y); } else { output->cursor.hot_x = cpu_to_le32(0); output->cursor.hot_y = cpu_to_le32(0); -- 2.41.0