Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3CD0DC433F5 for ; Mon, 22 Nov 2021 10:05:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239178AbhKVKIe (ORCPT ); Mon, 22 Nov 2021 05:08:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239165AbhKVKIc (ORCPT ); Mon, 22 Nov 2021 05:08:32 -0500 Received: from mail.marcansoft.com (marcansoft.com [IPv6:2a01:298:fe:f::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B01CC061714 for ; Mon, 22 Nov 2021 02:05:24 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: marcan@marcan.st) by mail.marcansoft.com (Postfix) with ESMTPSA id 65DD83FA5E; Mon, 22 Nov 2021 10:05:19 +0000 (UTC) Subject: Re: [PATCH 2/3] drm/format-helper: Add drm_fb_xrgb8888_to_xrgb2101010_dstclip() To: Pekka Paalanen Cc: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, Alyssa Rosenzweig , linux-kernel@vger.kernel.org References: <20211117145829.204360-1-marcan@marcan.st> <20211117145829.204360-3-marcan@marcan.st> <20211122115247.257f30fa@eldfell> From: Hector Martin Message-ID: <7e1356b9-3122-e169-193e-37547a50499a@marcan.st> Date: Mon, 22 Nov 2021 19:05:16 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20211122115247.257f30fa@eldfell> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: es-ES Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22/11/2021 18.52, Pekka Paalanen wrote: > On Wed, 17 Nov 2021 23:58:28 +0900 > Hector Martin wrote: > >> Add XRGB8888 emulation support for devices that can only do XRGB2101010. >> >> This is chiefly useful for simpledrm on Apple devices where the >> bootloader-provided framebuffer is 10-bit, which already works fine with >> simplefb. This is required to make simpledrm support this too. >> >> Signed-off-by: Hector Martin >> --- >> drivers/gpu/drm/drm_format_helper.c | 64 +++++++++++++++++++++++++++++ >> include/drm/drm_format_helper.h | 4 ++ >> 2 files changed, 68 insertions(+) > > Hi Hector, > > I'm curious, since the bootloader seems to always set up a 10-bit mode, > is there a reason for it that you can guess? Is the monitor in WCG or > even HDR mode? My guess is that Apple prefer to use 10-bit framebuffers for seamless handover with their graphics stack, which presumably uses 10-bit framebuffers these days. It seems to be unconditional; I've never seen anything but 10 bits across all Apple devices, both with the internal panels on laptops and with bog standard external displays on the Mac Mini via HDMI. HDR is not necessary, even very dumb capture cards and old screens get a 10-bit framebufer in memory. The only time I see an 8-bit framebuffer is with *no* monitor connected on the Mini, in which case you get an 8-bit 640x1136 dummy framebuffer (that's the iPhone 5 screen resolution... :-) ) -- Hector Martin (marcan@marcan.st) Public Key: https://mrcn.st/pub