Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp8745549rwb; Thu, 24 Nov 2022 03:52:29 -0800 (PST) X-Google-Smtp-Source: AA0mqf5+kMBlt3kExUJ6Tiz+sG3vqihhu0fF7jN+phbtGvfk3s9M1nIv9lQXPG1GmQ9kl7J98J9N X-Received: by 2002:a05:6a00:2396:b0:56c:318a:f808 with SMTP id f22-20020a056a00239600b0056c318af808mr16085802pfc.11.1669290749471; Thu, 24 Nov 2022 03:52:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669290749; cv=none; d=google.com; s=arc-20160816; b=C9wG57+pySpz+JoIjdQ02JW287cX5m8NxWn1l1oyJiPUlahY4EkwbXjXESXWP5yS1+ 1KDScVofj6yvZnwrbIctPacXftSUt6ZNDOtGp9F5wjiDTCLdv3Du74uX27QxiMKAH4tu qI2sTqXLd53OvrtdK2NZ5wVXPn4u9d/YzNTfWYoaxwAyXuL90EDZxpqgm2OVMeTmlRDw c3oM8QTyo5unckKsibtAuwUHipX/IO2/IUHvmrFg12+kDvIMg9O6TLXjXYC3UEwjd3bf 9odVNSTneDmP2Utm9sAl8Nak7xnQsnM4h7Jzz7KdDW/Rr+58VveAPEBj1QIMq5KnLjD/ mOXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=xPrnI3wUzzA5EN1dGSFZgqDRTkuK8RUJQxnTAkxblL0=; b=PJA5etFCc7+dAgSTRHZXuyavrGoEJI4VRbX5Q7oqQ2PTk+AyATPKpxeIQZi1z3hJig WCpgQSMgXBA5kMUTBVCoQwpGuEfjX7jYf2eQdUDbQI/Em/3Kz6yFmTgvDusbibwCF6DS XKvaexc7ySVkmJLAU7E05LMcjjG+o/riAUdbryni+QpNEu6O+VxhTzIAWAQm2GTWgudu /YZ0LpSYmJwcXlMuqp6UQuNE58GIBQbZ13un/dHsheac15hpr0hHCbszqgMjySZT05YV LlHJ07LXG6xpKmzVG/h7N+avy3gExCBF3kI33EfKlEdcckN6RGUK6qkfmS5//qWun8XI xbzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ICsGyojk; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s200-20020a632cd1000000b0042adcc66b1asi1245911pgs.22.2022.11.24.03.52.18; Thu, 24 Nov 2022 03:52:29 -0800 (PST) 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=@redhat.com header.s=mimecast20190719 header.b=ICsGyojk; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229468AbiKXLTT (ORCPT + 86 others); Thu, 24 Nov 2022 06:19:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230015AbiKXLTM (ORCPT ); Thu, 24 Nov 2022 06:19:12 -0500 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 E21627D287 for ; Thu, 24 Nov 2022 03:18:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669288682; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=xPrnI3wUzzA5EN1dGSFZgqDRTkuK8RUJQxnTAkxblL0=; b=ICsGyojkrI657XQb/u27fYu1YzNkQ18cPjcn3vShqogL3hh6tKOIxj7kOnd43MvyRLFJuF Js9IXknS/2WSHA2gsXMGsoI8Ij2l7cH+lAyZM8T5ZmTKZ3/3jqjZIsymSH6O5GjAGsEmtw 7Zc0qeri2kcDnLG8cnHvdHQTcuzYWYg= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-16-f7iuFoDwNPSvuE7nPRhkhQ-1; Thu, 24 Nov 2022 06:17:58 -0500 X-MC-Unique: f7iuFoDwNPSvuE7nPRhkhQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F40AD858F17; Thu, 24 Nov 2022 11:17:57 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.212]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 817292166B26; Thu, 24 Nov 2022 11:17:57 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 2A9D91800609; Thu, 24 Nov 2022 12:17:54 +0100 (CET) Date: Thu, 24 Nov 2022 12:17:54 +0100 From: Gerd Hoffmann To: Geert Uytterhoeven Cc: Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH resend v2] drm/fourcc: Add missing big-endian XRGB1555 and RGB565 formats Message-ID: <20221124111754.yrfewus6mqismc3b@sirius.home.kraxel.org> References: <3ee1f8144feb96c28742b22384189f1f83bcfc1a.1669221671.git.geert@linux-m68k.org> <20221124065148.7v4m3qli2k74mic6@sirius.home.kraxel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 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_H2,SPF_HELO_NONE,SPF_NONE 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 Hi, > > Supporting 16 bpp in the driver wouldn't be that much of a problem, but > > processing the framebuffer on the host side when emulating a big endian > > guest on a little endian host is painful. I think I can't ask pixman to > > do a conversation from DRM_FORMAT_RGB565 | DRM_FORMAT_BIG_ENDIAN to > > DRM_FORMAT_XRGB8888 on a little endian machine. > > Indeed. But you can do a quick 16-bit byteswap, and convert from > DRM_FORMAT_RGB565 to DRM_FORMAT_XRGB8888? Sure doable, but it's an extra step in a rarely tested code path ... > BTW, does pixman support converting DRM_FORMAT_RGB565 to > DRM_FORMAT_XRGB8888 on a big-endian machine? I don't think so. When you can get the color bits with shifting and masking pixman is happy. For rgb565 (and xrgb1555) that works only on native byte order. take care, Gerd