Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3224673rdh; Mon, 27 Nov 2023 09:00:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IEn7y6hJOn5FtGF4SF6W/KyPx+d0crfAsDtUWlH2CavYL5i8sJBznxdYHTwkDTR7ytWi0mH X-Received: by 2002:a05:6a00:1952:b0:6cb:65e6:3e49 with SMTP id s18-20020a056a00195200b006cb65e63e49mr16412668pfk.27.1701104408912; Mon, 27 Nov 2023 09:00:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701104408; cv=pass; d=google.com; s=arc-20160816; b=eD1zXzwsRznOdbGlCb2g9DGI7W/r2Stdc0BokeXA+elVeDIdRHU0tJoZdJHhykdIA3 OBtcuRwZeR3F9/gl8t58AgYkblthwuH0zwEPnWZcIQ98abofcJz5IloU/vN7s3jcGFl7 sl0c9Ua0L26D2n0pODN2PAxZi6UQ5WF2rmgcpMW9SWcsCPjlwhES5Q+K/fLMvIePRTVw ZiOWa7DDXg7HlSM8x9EzhozWPLWH4wY/qFPIxdNorRxk9UvgWQQDzDMwQmcrkexXShWM slq5Uxqdqq383u/OIiw0Kov9f7wglJDrb+pgla7Uc07DITuNLzlxOda4tCL1RydjVlTB zeAg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-signature; bh=QJUXeT/G7oE/8Y0b39Zjpc2uXnqV72pbi/a6a1IQmzk=; fh=nf0uT41NakMwvw7g1nwip4l6ps1jhBZMVPunZR6jVts=; b=jRTDjPCXh7lHZHFZoxK/O3pUbb0vvDdc5HEcfJemYjTjG1e/NUK5pCBDUbx3O1/HyD 70O4cav9mkS3JE31+4klgBZMiyCXRZFt06j14nS9ep6znEsmojPvY8II31LQobRQMgln 3VD8fJmx51AuyCbPG2JZj52lf8fh6hneAK3wPwJhDkC/Hs2e4qy/RSSsqcaQ4GCbVZHT QnoWhgrF+zQrC2JL3jWSfyh4hQO0w4Y079eHQnXgonUmLbPgzYuwRGLCfJz4oUoFmm/q mnpZus7LpxNO4fr8SK2rGq/sHhA8w5Mi15clze648CR+kQljbuzkcJZqMJL95g3ZF/gp IgmQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@xenosoft.de header.s=strato-dkim-0002 header.b=FdX64lTn; dkim=neutral (no key) header.i=@xenosoft.de header.s=strato-dkim-0003; arc=pass (i=1); 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 Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id c13-20020a056a000acd00b006cb7f9ddbd5si10251998pfl.321.2023.11.27.09.00.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 09:00:08 -0800 (PST) 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=@xenosoft.de header.s=strato-dkim-0002 header.b=FdX64lTn; dkim=neutral (no key) header.i=@xenosoft.de header.s=strato-dkim-0003; arc=pass (i=1); 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 Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 2F7F380403A0; Sat, 25 Nov 2023 02:06:59 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231796AbjKYKGo (ORCPT + 99 others); Sat, 25 Nov 2023 05:06:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229483AbjKYKGm (ORCPT ); Sat, 25 Nov 2023 05:06:42 -0500 Received: from mo4-p01-ob.smtp.rzone.de (mo4-p01-ob.smtp.rzone.de [81.169.146.167]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B305C10D8 for ; Sat, 25 Nov 2023 02:06:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700906797; cv=none; d=strato.com; s=strato-dkim-0002; b=XNinLICU1K7MCbYNTs1mT1llCrKfO2gujtQ1R7N0JwFH3UDsbasdO9DoWmzNqgqAXD f0nQYqL8h9oXfGKBiJ9TOI4NGgdjMTSPXX/rMDCaBdo5997rAn1jE+UV3Yxl7ppJ0VKf b907vKF1Ws86xhphDdkpexUZGUhdALMalv577SxGTtPPOBnM8t4oZq6Koc0+SlJs3AxT YHVrZdQs/oXvjga8kwALiYv4DVktGMrsp1B6DdA49g+TpdDZ6wVhpfomjR2bNTzrZr9K wn7wzaq6548cOeRuRF/xWPOQ/C21OB6cW0qRcg9vfP6+mRUmphnaVd4zdI2rv0OqdCwe R60w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1700906797; s=strato-dkim-0002; d=strato.com; h=In-Reply-To:From:References:Cc:To:Subject:Date:Message-ID:Cc:Date: From:Subject:Sender; bh=QJUXeT/G7oE/8Y0b39Zjpc2uXnqV72pbi/a6a1IQmzk=; b=G5b4/6ZAG4Dwc0aFPW2/AVb+0tt73qAwgMT6VaHuSjs8Vh6z4ZtVMYBfw89SjxlM1j EEzTY9FslyH1ljx+OMw59GczCtztMN/6GMYL/HbmwVrf3Lj4bodSbRT8Wg5eLs4ioB38 +j2blh9a/ayCY1Dkoj7d0YinEPhwwiS+OxzByFWSNmWN2HXnIa1dZ3V1O/2r6X9MaJrc t12oEGdzBH0jZJgeTQQfzyMGyK748gK1c+pmZvBp10pR2BGtdhaAE4pZQYfW0tRDyYaL yZsdlBNGayw5UcKxvbeldIZlRFFYno+vSxR8xBdE/Ma1NiuFU52DsWTH+AGzN38FeH7t LNVg== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo01 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1700906797; s=strato-dkim-0002; d=xenosoft.de; h=In-Reply-To:From:References:Cc:To:Subject:Date:Message-ID:Cc:Date: From:Subject:Sender; bh=QJUXeT/G7oE/8Y0b39Zjpc2uXnqV72pbi/a6a1IQmzk=; b=FdX64lTng3LTaWf4XPfAjfd1TdbKv60M9Gs2ra/KrT3hTMf9C4t1T4dd7dIpTdaRDx HK/CUN9KM7EAI7E1pn5bp/7mNOpbAkP7P/uCmMWSJ6nIQ4l5j4XVUKY+7WfaOWFz/+oy QZsFp+hpe4xpLkZEoovPlt4RqRU6Guo1s7uxxy1hQDtUixA//ofjfHcn372CpsI/EVwc S892waIsyB9oK1MYCtpq93b1j4VUjoem40u9LegbF0OSu3PFYzooyQn6BDZ+137VggRG Ei47jhRocHknkGe0HqBRRmcU+p2gTsJ13jO0ecA2zodMs86Z5cb+hwNyWUIw8qixiFJU bVPA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1700906797; s=strato-dkim-0003; d=xenosoft.de; h=In-Reply-To:From:References:Cc:To:Subject:Date:Message-ID:Cc:Date: From:Subject:Sender; bh=QJUXeT/G7oE/8Y0b39Zjpc2uXnqV72pbi/a6a1IQmzk=; b=TIm1Lfc+h2PjpmWRcoxeMAC+lCs5+dzw4/1RvzuylweJEm1FmWWcZyTAfmi7CjkU1t Bp3AS1ewxD1h/zmuRTCA== X-RZG-AUTH: ":L2QefEenb+UdBJSdRCXu93KJ1bmSGnhMdmOod1DhGM4l4Hio94KKxRySfLxnHfJ+Dkjp5DdBfi4XXBswJY1ymSyVTj2wKONxQss4byztTU3log==" Received: from [IPV6:2a02:8109:8984:5d00:1007:45f9:3fd1:2db6] by smtp.strato.de (RZmta 49.9.1 AUTH) with ESMTPSA id U060a4zAPA6anW8 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Sat, 25 Nov 2023 11:06:36 +0100 (CET) Message-ID: <37b9e5ab-e170-4071-a912-f3fec0d59d5c@xenosoft.de> Date: Sat, 25 Nov 2023 11:06:35 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] drm/virtio: Add suppport for non-native buffer formats To: Geert Uytterhoeven Cc: Gerd Hoffmann , David Airlie , Gurchetan Singh , Chia-I Wu , Daniel Vetter , Thomas Zimmermann , Laurent Vivier , Javier Martinez Canillas , Hamza Mahfooz , linux-m68k@lists.linux-m68k.org, dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, "R.T.Dickinson" , mad skateman , Christian Zigotzky References: <47a81d2e0e47b1715718779b6978a8b595cc7c5d.1700140609.git.geert@linux-m68k.org> <77c6gkquzq4sdtmrlko3lkxvcnipm2zfjem3kvhgslcellkefh@man7pbbzud47> Content-Language: de-DE From: Christian Zigotzky In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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]); Sat, 25 Nov 2023 02:06:59 -0800 (PST) On 19 November 2023 at 07:33 pm, Geert Uytterhoeven wrote: > Hi Christian, > > On Sun, Nov 19, 2023 at 5:28 PM Christian Zigotzky > wrote: >> On 16 November 2023 at 03:44 pm, Gerd Hoffmann wrote: >>> On Thu, Nov 16, 2023 at 02:16:54PM +0100, Geert Uytterhoeven wrote: >>>> When using virtgpu on a big-endian machine, e.g. powerpc QEMU: >>>> >>>> virtio-pci 0000:00:02.0: [drm] *ERROR* fbdev: Failed to setup generic emulation (ret=-2) >>>> >>>> or m68k/virt: >>>> >>>> virtio-mmio virtio-mmio.125: [drm] *ERROR* fbdev: Failed to setup generic emulation (ret=-2) >>>> >>>> and the graphical display fails to come up. >>>> >>>> Before, the call to drm_mode_addfb() caused a translation from a fourcc >>>> format (XR24) to a bpp/depth pair (32/24) to a potentially different fourcc >>>> format (BX24 on big-endian), due to the quirk processing in >>>> drm_driver_legacy_fb_format(). After, the original fourcc format (XR24) >>>> is passed unmodified. >>>> >>>> However, the virtgpu DRM driver supports only a single format for its >>>> main plane: DRM_FORMAT_HOST_XRGB8888, which is XR24 on little-endian, >>>> and BX24 on big-endian. I.e. on big-endian, virtgpu does not support >>>> XR24, which is the default DRM format, and must be supported by all >>>> drivers. Before, this was reported, but didn't lead to a failure: >>>> >>>> virtio-mmio virtio-mmio.125: [drm] bpp/depth value of 32/24 not supported >>>> virtio-mmio virtio-mmio.125: [drm] No compatible format found >>>> >>>> As the core virtgpu driver and device support both XR24 and BX24 on both >>>> little-endian and big-endian just fine, fix this extending the list of >>>> supported formats for main plane and cursor plane to XR24/BX24 resp. >>>> AR24/BA24. >>>> >>>> Fixes: 6ae2ff23aa43a0c4 ("drm/client: Convert drm_client_buffer_addfb() to drm_mode_addfb2()") >>>> Reported-by: Christian Zigotzky >>>> Closes: https://lore.kernel.org/r/c47fba21-3ae9-4021-9f4a-09c2670ebdbc@xenosoft.de >>>> Suggested-by: Gerd Hoffmann >>>> Signed-off-by: Geert Uytterhoeven >>> Reviewed-by: Gerd Hoffmann >> The new patch works but I don't see the virtio-mouse-pci pointer >> anymore. I see the pointer with -device usb-tablet. Please check the >> second patch. I will use the first patch for the RC2 of kernel 6.7. > That's probably partially explained by commit 99748ab64fcc8578 ("drm: > virtio: fix virtio_gpu_cursor_formats"), which forced BA24 for the > cursor plane on big-endian, but unfortunately linked thread doesn't > contain the full picture. > > Where is the default cursor format defined? > I see virtio_gpu_mode_dumb_create() still defaults to > DRM_FORMAT_HOST_XRGB8888. However, that can't be the cause, as the > cursor formats require an alpha channel. > > Gr{oetje,eeting}s, > > Geert > Hi Geert, Could you please revert the v2 patch because of the issue with the virtio-mouse-pci cursor? I will try to use the v1 patch for the RC3 of kernel 6.7. Thanks, Christian