From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 77EDE28E0 for ; Mon, 2 May 2022 13:28:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1651498112; 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=2zV+k9kqlgz67AfOxcNykb0h39cTNVnn0WXnNEGgjk4=; b=M/bOdoL2S3N0JICWRmvfdoNBvP4iNrDAP1wSgx/MeZZQL2CSowHRGcH3mF5Gt1s8xHPhCN SX7OFMMemNWaKzv/qjEmY3I630B0PmkjWeVJZ+08PF/1KgZ0hh5grd8LMv9v5B3qjzJc7d UaFePn/FknHIegcRpdvjKAe8qaTrvR4= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-654-5uYTONOgMwidzG6rlFXRLw-1; Mon, 02 May 2022 09:28:31 -0400 X-MC-Unique: 5uYTONOgMwidzG6rlFXRLw-1 Received: by mail-wr1-f69.google.com with SMTP id u26-20020adfb21a000000b0020ac48a9aa4so5309810wra.5 for ; Mon, 02 May 2022 06:28:30 -0700 (PDT) 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=2zV+k9kqlgz67AfOxcNykb0h39cTNVnn0WXnNEGgjk4=; b=uChggg0xPpa5FCpPYnPwxWtoOpze437kUJfV2tSq3IiiwLatU8teYTmvZddDBuB2hU zcqp0htzqXajoxlicGsucjqNTJXJbtzUxPpg/+yFSmLiUi4r//IsYdxI0Jp/fGMrjKRO 6RQ76W2XIUIGQOWaLLGSzgXG/tDdEd+dbdon3hApu9/yffmH0xnRrxNDvAY9r6QQcgAv PuxspYWJN1rWUngECP4N7ZUpTFBRTLKLcyW12aYVmau44p18kGekH1Qj4PvMk0U8/vhC ypE73YGF5zEla+Aq3tJcGL6T9VtztDb+Hlxj2/EsNJavyF1sOPnZKshMP+rCNoNK6l51 3ojw== X-Gm-Message-State: AOAM532KLv+lnEetp5wqnRc6E7mO1cPDzHjSXMLm6e+00yk9jYc9IeMc i+RWR/qSVgxco4ZfBhMvtUzHzPdX57h8bv7OQYL8DCIjU+0NahuMBcI8YovuXKN/g9OvzFrdT/L kKcb7krTCzmyIAjZwrjxdsD0= X-Received: by 2002:a05:600c:1c20:b0:394:25cb:1404 with SMTP id j32-20020a05600c1c2000b0039425cb1404mr12244366wms.52.1651498109805; Mon, 02 May 2022 06:28:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzu2jM2LG+DX+dIVzq45o/V1TxQWIpFsCwnWfT+RmC19xyv+UYhuI/wi7PI/5TDnuN7eFlQ9w== X-Received: by 2002:a05:600c:1c20:b0:394:25cb:1404 with SMTP id j32-20020a05600c1c2000b0039425cb1404mr12244330wms.52.1651498109516; Mon, 02 May 2022 06:28:29 -0700 (PDT) Received: from [192.168.1.129] ([92.176.231.205]) by smtp.gmail.com with ESMTPSA id l3-20020adfa383000000b0020c5253d8bcsm6985850wrb.8.2022.05.02.06.28.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 02 May 2022 06:28:29 -0700 (PDT) Message-ID: Date: Mon, 2 May 2022 15:28:25 +0200 Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH 2/3] drm/fb-helper: Rename preferred_bpp drm_fbdev_generic_setup() parameter To: Laurent Pinchart Cc: Alexandre Belloni , Emma Anholt , Chun-Kuang Hu , David Airlie , Laurentiu Palcu , Liviu Dudau , Alexandre Torgue , Gurchetan Singh , Paul Cercueil , Gerd Hoffmann , Shawn Guo , linux-stm32@st-md-mailman.stormreply.com, Jerome Brunet , Marek Vasut , Hao Fang , linux-aspeed@lists.ozlabs.org, Samuel Holland , Kevin Hilman , Neil Armstrong , Alexey Brodkin , Michal Simek , Jernej Skrabec , Xinliang Liu , Chen-Yu Tsai , Joel Stanley , Dave Airlie , Xinwei Kong , virtualization@lists.linux-foundation.org, NXP Linux Team , Thomas Zimmermann , Raphael Gallais-Pou , Martin Blumenstingl , Chen Feng , Sascha Hauer , Alison Wang , linux-mips@vger.kernel.org, Sam Ravnborg , Hans de Goede , linux-mediatek@lists.infradead.org, dri-devel@lists.freedesktop.org, Alain Volmat , Matthias Brugger , linux-amlogic@lists.infradead.org, Mario Limonciello , Evan Quan , Pengutronix Kernel Team , Yong Wu , linux-arm-kernel@lists.infradead.org, Maxime Coquelin , linux-sunxi@lists.linux.dev, amd-gfx@lists.freedesktop.org, Tomi Valkeinen , Hyun Kwon , Boris Brezillon , Andrew Jeffery , Greg Kroah-Hartman , Yannick Fertre , "Pan, Xinhui" , linux-kernel@vger.kernel.org, Claudiu Beznea , linux-renesas-soc@vger.kernel.org, Solomon Chiu , Kieran Bingham , Philippe Cornu , Nicolas Ferre , Alex Deucher , Tian Tao , spice-devel@lists.freedesktop.org, Jyri Sarha , =?UTF-8?Q?Christian_K=c3=b6nig?= References: <20220502084830.285639-1-javierm@redhat.com> <20220502084830.285639-3-javierm@redhat.com> From: Javier Martinez Canillas In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=javierm@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hello Laurent, On 5/2/22 13:34, Laurent Pinchart wrote: > Hi Javier, > > Thank you for the patch. > Thanks a lot for your feedback. [snip] >> +++ b/drivers/gpu/drm/drm_fb_helper.c >> @@ -2501,8 +2501,16 @@ static const struct drm_client_funcs drm_fbdev_client_funcs = { >> /** >> * drm_fbdev_generic_setup() - Setup generic fbdev emulation >> * @dev: DRM device >> - * @preferred_bpp: Preferred bits per pixel for the device. >> - * @dev->mode_config.preferred_depth is used if this is zero. >> + * @options: options for the registered framebuffer. >> + * >> + * The @options parameter is a multi-field parameter that can contain >> + * different options for the emulated framebuffer device registered. >> + * >> + * The options must be set using DRM_FB_SET_OPTION() and obtained using >> + * DRM_FB_GET_OPTION(). The options field are the following: >> + * >> + * * DRM_FB_BPP: bits per pixel for the device. If the field is not set, >> + * @dev->mode_config.preferred_depth is used instead. > > Do I assume correctly that a driver that would need to set multiple > options would do something like > > drm_fbdev_generic_setup(dev, DRM_FB_SET_OPTION(DRM_FB_BPP, 32) | > DRM_FB_SET_OPTION(DRM_FB_FW, 1)); > That's correct, yes. > ? If so, I would rename DRM_FB_SET_OPTION() to DRM_FB_OPTION() as it's > computing the value of the option bitfield, it doesn't actually set it. > Apart from that, > Right. I'll rename it. > Reviewed-by: Laurent Pinchart > Thanks! -- Best regards, Javier Martinez Canillas Linux Engineering Red Hat