From patchwork Sat Oct 22 07:23:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7412 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1097507wrr; Sat, 22 Oct 2022 01:07:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5vgTL+GM6JbBEwMEUdezPQVaV3ticPKZDnQ8bOsJNyxQMowj1U6kOIQcEwTyA39LRb7BRo X-Received: by 2002:a65:6e4a:0:b0:438:874c:53fd with SMTP id be10-20020a656e4a000000b00438874c53fdmr20183212pgb.355.1666426076929; Sat, 22 Oct 2022 01:07:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666426076; cv=none; d=google.com; s=arc-20160816; b=EclL9JEgebhXMOXuWyAn29fLaS9gundmmUf0mC7THPfo251/Oajf9i4xvJF9SG8Wq2 /m54w35xB/9swZZT7OrPiP0MNyH65bAj6p8xu2JmyYIuG8x1Er0Cq4fJ/BMDJMBrprBX Cmccv2hhneEqXxr9ATSnQthoxcm1KxNwHN2rVZv1/AZhV5TVM6OMG8xtvG869zrCFBXf GUnrQ7VWf8phc+5mVzNFbB/W7T8Gx53dRI6JL6Af3RH76T0KcgQmhOgizV7KKotQfHMa DcOPkTt+AE7zv7tsappBRSkmN+6h8Psi/WK/TvZcjR0lpyUqERebX7JL+XS3GirkmwW7 gZXw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=KXGEhK+ZyJg45MIZH8zMPCyPbNvVStLuXTcKClQ5YP8=; b=VGI2QdLeIFRQ2Ns4nBpJv3iahZ2ECumvIjTPcyzuOco63AaXaiHfe9N0qTJlRtoWV+ W/D/kyRx93wqKwAvqAAhCaTXreunMpa1R9VW48v0jm00jfG+uQ1xR02zJ25CXiMo5hxr hsF292+ylwwzU3QQN+Iia0Q5gx021LC/GW64YvVS9RteSdrk2vzZgsBjjO8mEaVLfjSS M2ryX4Evammcyf0sukYmu8WR1038DBXb3LD7eXRmHFh1mOsoDBm+x8pfL6QUBM9iBj9b A/BndE+LybzZvYsXxVOKNuBB9xz3+pHru5eZC3dZKYMoMRw49EMN4GKQCTLa8oJpKv7n TvNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AvCFikQT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mq11-20020a17090b380b00b0020a7e0138d2si10839441pjb.50.2022.10.22.01.07.41; Sat, 22 Oct 2022 01:07:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AvCFikQT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232924AbiJVIHT (ORCPT + 99 others); Sat, 22 Oct 2022 04:07:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232458AbiJVIBj (ORCPT ); Sat, 22 Oct 2022 04:01:39 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4035628B1A4; Sat, 22 Oct 2022 00:50:47 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 390A060B49; Sat, 22 Oct 2022 07:48:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 48354C433C1; Sat, 22 Oct 2022 07:48:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666424916; bh=ZgKxMsG8k59NViVoefO54z2B9yZQpBZLWjXNfWIvuok=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AvCFikQTdkONowiA9cqeyuvqFlNx6ynYfiFh9U0V/MM2rreuUXySOooy/dnxW1SqW B4gzROSqv4jFhgq4a18gEQcvdkPcVn+83OVwmq+FVt0VBAlqlAoAZUQF0jwgaNYcK1 kUf0ZdwZg3z6HGE2U46k0dXpn1wS897qg4XjeuFg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shao-Chuan Lee , Chia-I Wu , Gerd Hoffmann , Sasha Levin Subject: [PATCH 5.19 323/717] drm/virtio: set fb_modifiers_not_supported Date: Sat, 22 Oct 2022 09:23:22 +0200 Message-Id: <20221022072508.789883172@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747374389835676102?= X-GMAIL-MSGID: =?utf-8?q?1747374389835676102?= From: Chia-I Wu [ Upstream commit 85faca8ca0f659263b5fb2385e4c231cc075bd84 ] Without this, the drm core advertises LINEAR modifier which is incorrect. Also userspace virgl does not support modifiers. For example, it causes chrome on ozone/drm to fail with "Failed to create scanout buffer". Fixes: 2af104290da5 ("drm: introduce fb_modifiers_not_supported flag in mode_config") Suggested-by: Shao-Chuan Lee Signed-off-by: Chia-I Wu Link: http://patchwork.freedesktop.org/patch/msgid/20220831190601.1295129-1-olvaffe@gmail.com Signed-off-by: Gerd Hoffmann Signed-off-by: Sasha Levin --- drivers/gpu/drm/virtio/virtgpu_display.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c index f73352e7b832..96e71813864a 100644 --- a/drivers/gpu/drm/virtio/virtgpu_display.c +++ b/drivers/gpu/drm/virtio/virtgpu_display.c @@ -348,6 +348,8 @@ int virtio_gpu_modeset_init(struct virtio_gpu_device *vgdev) vgdev->ddev->mode_config.max_width = XRES_MAX; vgdev->ddev->mode_config.max_height = YRES_MAX; + vgdev->ddev->mode_config.fb_modifiers_not_supported = true; + for (i = 0 ; i < vgdev->num_scanouts; ++i) vgdev_output_init(vgdev, i);