From patchwork Wed Oct 19 08:27:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 5564 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp350426wrs; Wed, 19 Oct 2022 07:13:38 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7RfdSkhiWct0IqmlWV82OQXBsrk4b2BKyi4ZaiqU5r/U6ehOHT0SifDJGe0ZQi91NU9IN8 X-Received: by 2002:a63:5b16:0:b0:439:ac9b:34b5 with SMTP id p22-20020a635b16000000b00439ac9b34b5mr7409283pgb.144.1666188818199; Wed, 19 Oct 2022 07:13:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666188818; cv=none; d=google.com; s=arc-20160816; b=JZPD6crohNx4asRoLkhMbGN9pGtink8TRlTFxLNDN2z2O197D0CahB5X8OKigRsfEc m3fjI9tYqO+RFEJnWIBGWsjuYOJHD9JqRWdVG+VGPzcsmuLDf0ynsNVFdLVe6GmYhnes ixuk79hR5kGPMinVMtNtUgktjwGskjC3jJc5BYyTv1/ZuQp5tnvcAaAjmyVtFhGdrXOB gcAJhr+vFf38nHlu+tQkDFte32g7H/q0hXyoa2lbzBx1DbXv7h3wsrL2nOcNAM9pOTRf GEQomn3T616Z9NVds42joESumEAXQE1ybkC2ojoAgrpAfPhjrTiUFObM+23UODX6ESMJ bVEw== 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=rHs9slV/GImFoBtRd71/vNDhv5IKg65k+hcXfdsWq20=; b=MEr1YwOa62Oxg+vWIncf21zn22Kmuig/vGzXiXCAoS0I9jNpzINA6tMypITqyA3Tzi Ib+JN7DA6HObqlN/LuxWklgnxAzLVhDTca3KfGm4BMAl1VxkNrSeZku+9kx04T5WkDXv Rryb94+iJwwHr22Ro5p5hmArhV7PSBvEvPAEMwpD/pcrbpYpYHOAE6+YQ2deNkRlHpDW zp+pRu5hM27AHvdVnl0t3VxN3D7UoCbscbwVm4qFGELirvM1aPTl2WA95b/hUb7ODZWN yarzJUqhq5rcrSSvoOZkJmzAVPZsjXfcXVG4+bTG7x0gMTLt2O/+WH9o5OavxN2EMFqE CAVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YjGzP9x5; 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 q6-20020a6557c6000000b00453f9620c4dsi19033504pgr.503.2022.10.19.07.13.09; Wed, 19 Oct 2022 07:13:37 -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=YjGzP9x5; 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 S232351AbiJSN5T (ORCPT + 99 others); Wed, 19 Oct 2022 09:57:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233860AbiJSNyN (ORCPT ); Wed, 19 Oct 2022 09:54:13 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8DC816551B; Wed, 19 Oct 2022 06:36:53 -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 ams.source.kernel.org (Postfix) with ESMTPS id EC667B82419; Wed, 19 Oct 2022 08:56:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 45A82C433B5; Wed, 19 Oct 2022 08:56:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169805; bh=nvtaYVSKFDDYUb6/1fBbU9SEqDqsjhxHoNRXYfa+jfw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YjGzP9x5i0SA3Opuad1SSF0HeGbI50iuAMAftq9MRJRLNmz7GK7FQbxqPPEDA55Au rkzbhyzIIDsYLxj0lTecpc+YyKUiBTejPm4CymSg8DQ+i1nr0Rj79zOAlghN8Mnae9 TUEmZfwDZNjFDiwZdy/R21bmu4ZbfaPuOTyL2P8Q= 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 6.0 383/862] drm/virtio: set fb_modifiers_not_supported Date: Wed, 19 Oct 2022 10:27:50 +0200 Message-Id: <20221019083306.878330786@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 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?1747125605576863547?= X-GMAIL-MSGID: =?utf-8?q?1747125605576863547?= 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 5c7f198c0712..9ea7611a9e0f 100644 --- a/drivers/gpu/drm/virtio/virtgpu_display.c +++ b/drivers/gpu/drm/virtio/virtgpu_display.c @@ -349,6 +349,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);