From mboxrd@z Thu Jan 1 00:00:00 1970 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 ADC6EC433F5 for ; Mon, 31 Jan 2022 10:19:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358077AbiAaKTD (ORCPT ); Mon, 31 Jan 2022 05:19:03 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:59054 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1358078AbiAaKTC (ORCPT ); Mon, 31 Jan 2022 05:19:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1643624341; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ezN9srlnTogaHSQ6pDdu/S41B39M1Hq9JuNzonZ57Cg=; b=PHkJf5zTNsw/KZ9NsBFrE0Pxt7cRreREq1+rxQ2xWEXOIi3NslVPn/c6aN87W4mmbI1aBU 4QrVfkacNXPbcRt3VCVTqqTgzHGz5km8e5XlKEYjBILCCCXJ76ZyUrBveNIQZlKCpv/LCG SFeWdTzXYLoxHKKwYyr1B9I2JsNcRVM= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-662-gvgPfkPwPkWPVA6zrp_lFA-1; Mon, 31 Jan 2022 05:19:00 -0500 X-MC-Unique: gvgPfkPwPkWPVA6zrp_lFA-1 Received: by mail-wm1-f71.google.com with SMTP id o194-20020a1ca5cb000000b00350b177fb22so9371468wme.3 for ; Mon, 31 Jan 2022 02:19:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=ezN9srlnTogaHSQ6pDdu/S41B39M1Hq9JuNzonZ57Cg=; b=XQZ6kZ/7DqhDzeIypfXSl2/GEA+4jpOqkDBP4GGUYQ49R47QrGw9rBMFpdlGdoh0RG J1ZPOdlZMA9XAbMcjjoFOfXw6OBcLpyFOLuiT8EmTdEt9zteVk2Cq8DbHRyaM7q/lESo HFcGiPTTOGc3YGmbaCnoWnInDxEGkXsb8haiFs43GRamuyHA39Q51LGQQ7HsMX3FLlQT huF5fPROySbdiSFlNZCPpu6mDZmFp7syFqNXxV2088RErJh/9+BIlnpqd+vSaS93xrEJ NSB1fbZvhcs7VOEd5xJmNYh+6txrChJVWWmGGT2foHLHOG/X9+X0KmaIo4gAP7uS7uK8 Lmgw== X-Gm-Message-State: AOAM533lTxH36CmCtbZU2WJTkWZarKwNjiHL2lCLGasgBnrn7m/PLjOJ 3gQ2Uyiq5kH7QxaVOg3SocumQsRWsbdsCrzMwW+xWV4OcD1XVenZQUR6LmlUjQsyjQ7isGyrJFG Wwjnu2/Ti9Jfpu5vezRkSYhE= X-Received: by 2002:a1c:2b06:: with SMTP id r6mr26447547wmr.4.1643624338963; Mon, 31 Jan 2022 02:18:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJy6yso14y+Zswq6KcxIX1p6IfO2d1DlRdiLxdSQGf4tasukfjBg65Jy0k1OpEVR9pwdMvsjnQ== X-Received: by 2002:a1c:2b06:: with SMTP id r6mr26447519wmr.4.1643624338693; Mon, 31 Jan 2022 02:18:58 -0800 (PST) Received: from [192.168.1.102] ([92.176.231.205]) by smtp.gmail.com with ESMTPSA id n18sm11302007wrm.47.2022.01.31.02.18.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 31 Jan 2022 02:18:58 -0800 (PST) Message-ID: <840ec74d-60c6-9480-709c-8cd597c6f5b0@redhat.com> Date: Mon, 31 Jan 2022 11:18:57 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH v1 1/4] fbtft: Unorphan the driver Content-Language: en-US To: Thomas Zimmermann , Andy Shevchenko Cc: Andy Shevchenko , linux-fbdev@vger.kernel.org, Michael Hennerich , Greg Kroah-Hartman , Helge Deller , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Phillip Potter , Carlis , Lee Jones , Heiner Kallweit References: <20220125202118.63362-1-andriy.shevchenko@linux.intel.com> <20220125202118.63362-2-andriy.shevchenko@linux.intel.com> <6e74d4cc-655a-e38e-0856-a59e4e6deb36@redhat.com> From: Javier Martinez Canillas In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org Hello Thomas, On 1/31/22 10:18, Thomas Zimmermann wrote: [snip] >> There are some hacks in the driver though. For example it exposes an XRGB8888 >> format even thought the OLED display is monochromatic and has 1 bit per pixel. >> >> The driver then goes and converts the XRGB8888 pixels first to grayscale and >> then to reverse mono. I took that idea from the repaper driver but that gives >> us the multiple copies that Geert was complaining about. > > This requires to update the console code for 1-bit BW output. The fbcon > side already supports this AFAIK. DRM's fbdev needs a few more branches > and something like a DRM_FORMAT_C1 fourcc. The XRGB8888 is really a > userspace requirement that is imposed by modern desktops. If DRM's > console has been updated, you could leave it out entirely. > > I could imagine that some simple userspace, such as Weston, comes with > support for palette formats and BW. Or there could be an entirely > separate program that puts graphics onto these displays. > Yes, I understand the rationale of why the repaper driver is doing that way but was just pointing out because Geert mentioned that is not efficient. Maybe in the meantime we can add a drm_fb_gray8_to_mono_reversed() helper to drivers/gpu/drm/drm_format_helper.c since there is more than one driver that does the same ? It's not a big issue for this device really since the I2C bus is slow anyways and the multiple copies are not a bottleneck AFAICT. I believe is worth to propose this driver as is and then try to optimize later. Another thing that's missing is a DRM_MODE_CONNECTOR_I2C, because I used for now a DRM_MODE_CONNECTOR_Unknown. Best regards, -- Javier Martinez Canillas Linux Engineering Red Hat