Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2919664pxb; Mon, 1 Nov 2021 04:39:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGzCJjoEH7nlY/MLAo3s+vfzt4A+18IY7fFEs2aIPs7wz2kta2kpqwrA+oAApTVeKaUGSk X-Received: by 2002:aa7:c391:: with SMTP id k17mr18263186edq.263.1635766745660; Mon, 01 Nov 2021 04:39:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635766745; cv=none; d=google.com; s=arc-20160816; b=yXjhpRwHH9VyhFUHIFoIX1WekC6sJJNj6qDKw5tHQIZiw1dbaLBc3Idwk1uOO6enoO +K0GtCSMZEmV6xWW5+tK+Yqyx3UFeoEkNWK5MFbVaMIiZa9ALxBTgFkTA+tIaSwRis0b NFvMATPvc1ORBRDv14RhNyk/ZQvJkn5tMkMq94jyGqWypqUjYTr2QUQ28Vo58oJP9Omd ojDDDWKSCW+cOsLfN84bHn3NcgL3TB+HBVnd5rrv0cvZHJSrdMsLTODujizz7oq0Z9f5 ulgiYevgrvEccEyzNJbtemVhU7QY8B2l4R/Z8CMOgPyflFNxqFipyu8v0EmUtHt5dRrT wEmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=A9I0cE/nnKP+AaM3FVQ+7ss2XCPWFrayxinGdUWg/w4=; b=h7bBVyfk9CokvEkGzvXZpr6h+CIw9TX3o2Zln6v01bds0xLYxU1rrXVfc+uUE8D2YQ BaxiVuKwYZI0ggfokMauhBtzsbBsZfEZyCTY6upXK2NQfZD+RUCAiHFRnv/hlPpcVB7d eeU/J3caLHLHgGScnzXNwXkSQI2LFxogZr/UEsy0HcCP1Tu0QLNwQDuovckvz0fcu9gU K+V/znTDHTJzEM8nV+XPd9GmyaPfWQ80Kq4eazA8gfD7N+RRYrYecTm4rlhIZ8lFvIXS ugHfBzv7kvZ/Hw+8+/z1AWaf0OlMH+jaHozBAJm1jRs7eDNeKsn7mEBoA2TuCe14QGkI kyMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@metanate.com header.s=stronger header.b=1Vm8feMn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=metanate.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j18si4217619ejo.437.2021.11.01.04.38.41; Mon, 01 Nov 2021 04:39:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@metanate.com header.s=stronger header.b=1Vm8feMn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=metanate.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231928AbhKALhA (ORCPT + 99 others); Mon, 1 Nov 2021 07:37:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231512AbhKALg7 (ORCPT ); Mon, 1 Nov 2021 07:36:59 -0400 Received: from metanate.com (unknown [IPv6:2001:8b0:1628:5005::111]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AB0FC061714 for ; Mon, 1 Nov 2021 04:34:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=metanate.com; s=stronger; h=Content-Transfer-Encoding:Content-Type: References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID :Content-Description; bh=A9I0cE/nnKP+AaM3FVQ+7ss2XCPWFrayxinGdUWg/w4=; b=1Vm8 feMnTe9gcKLlkTpLM83kWkvoQHg02zTj96kSb2nXQ07lt353zuIa0N7Id6v3LPB5KlA86Ppm816+u 1hl9zM0zrNhzkD25H6Fln8nob7b/2IlMg/sqtsOXyLY5Ed32vasv7ka1AZBsfLj7TE1lI/QGOo9Pc X5huFp7rNatFlSTj+N2kmqh79DYs75g4eR7o8HoGTsbYaglGjZDlBnXFz4KpvoVd8aQek6+/gy8qf Ebbc1o5UmIPSnsb77AD50M+AdGnu9KEeiArTfgkWrp0m13TqFrb5yvaWKBUkdLdbrnlgxfZb6XjYk dIcWXO5UmdvEwWN77o+HZsYNVI68/g==; Received: from [81.174.171.191] (helo=donbot) by email.metanate.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1mhVZw-00072X-C3; Mon, 01 Nov 2021 11:34:16 +0000 Date: Mon, 1 Nov 2021 11:34:15 +0000 From: John Keeping To: Thomas Zimmermann Cc: dri-devel@lists.freedesktop.org, Sandy Huang , Heiko =?UTF-8?B?U3TDvGJuZXI=?= , David Airlie , Daniel Vetter , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: Re: [PATCH] drm/rockchip: use generic fbdev setup Message-ID: <20211101113415.3bed0f62.john@metanate.com> In-Reply-To: <6e69f9bb-5a1e-7b79-38e8-d2860e5ee615@suse.de> References: <20211029115014.264084-1-john@metanate.com> <6e69f9bb-5a1e-7b79-38e8-d2860e5ee615@suse.de> X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Authenticated: YES Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 31 Oct 2021 19:09:39 +0100 Thomas Zimmermann wrote: > Am 30.10.21 um 14:05 schrieb John Keeping: > > On Fri, Oct 29, 2021 at 09:00:08PM +0200, Thomas Zimmermann wrote: > >> Am 29.10.21 um 13:50 schrieb John Keeping: > >>> The Rockchip fbdev code does not add anything compared to > >>> drm_fbdev_generic_setup(); the one custom function for .fb_mmap does the > >>> same thing as gem_prime_mmap which is called by the helper. > >>> > >>> Signed-off-by: John Keeping > >>> --- > >>> drivers/gpu/drm/rockchip/Makefile | 1 - > >>> drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 10 +- > >>> drivers/gpu/drm/rockchip/rockchip_drm_drv.h | 2 - > >>> drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c | 164 ------------------ > >>> drivers/gpu/drm/rockchip/rockchip_drm_fbdev.h | 24 --- > >>> 5 files changed, 2 insertions(+), 199 deletions(-) > >>> delete mode 100644 drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c > >>> delete mode 100644 drivers/gpu/drm/rockchip/rockchip_drm_fbdev.h > >>> > >>> diff --git a/drivers/gpu/drm/rockchip/Makefile b/drivers/gpu/drm/rockchip/Makefile > >>> index 17a9e7eb2130..1a56f696558c 100644 > >>> --- a/drivers/gpu/drm/rockchip/Makefile > >>> +++ b/drivers/gpu/drm/rockchip/Makefile > >>> @@ -5,7 +5,6 @@ > >>> rockchipdrm-y := rockchip_drm_drv.o rockchip_drm_fb.o \ > >>> rockchip_drm_gem.o rockchip_drm_vop.o rockchip_vop_reg.o > >>> -rockchipdrm-$(CONFIG_DRM_FBDEV_EMULATION) += rockchip_drm_fbdev.o > >>> rockchipdrm-$(CONFIG_ROCKCHIP_ANALOGIX_DP) += analogix_dp-rockchip.o > >>> rockchipdrm-$(CONFIG_ROCKCHIP_CDN_DP) += cdn-dp-core.o cdn-dp-reg.o > >>> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c > >>> index 69c699459dce..20d81ae69828 100644 > >>> --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c > >>> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c > >>> @@ -26,7 +26,6 @@ > >>> #include "rockchip_drm_drv.h" > >>> #include "rockchip_drm_fb.h" > >>> -#include "rockchip_drm_fbdev.h" > >>> #include "rockchip_drm_gem.h" > >>> #define DRIVER_NAME "rockchip" > >>> @@ -159,10 +158,6 @@ static int rockchip_drm_bind(struct device *dev) > >>> drm_mode_config_reset(drm_dev); > >>> - ret = rockchip_drm_fbdev_init(drm_dev); > >>> - if (ret) > >>> - goto err_unbind_all; > >>> - > >>> /* init kms poll for handling hpd */ > >>> drm_kms_helper_poll_init(drm_dev); > >>> @@ -170,10 +165,11 @@ static int rockchip_drm_bind(struct device *dev) > >>> if (ret) > >>> goto err_kms_helper_poll_fini; > >>> + drm_fbdev_generic_setup(drm_dev, 32); > >> > >> Please pass 0 for the final argument. The fbdev helpers pick 32 by default. > >> Maybe leave a comment if you require 32 here. > > > > I wanted to minimise the changes introduced here - passing 32 matches > > the value passed to drm_fb_helper_initial_config() in the deleted code > > from rockchip_drm_fbdev.c. > > In that case > > Acked-by: Thomas Zimmermann Thanks! > > > > What do you think about changing this to 0 in a follow-up patch? > > > > Yes. If possible, please provide a follow-up patch for this and set > modeconfig.prefered_depth to 24. I'll follow up with a patch setting this to zero, but I'm not convinced I understand mode_config.prefered_depth well enough to be confident setting it to 24 is the right thing to do. Looking at commits 23d4e55f7eeb ("drm/vkms: Unset preferred_depth") and 550f17441f53 ("drm/cirrus: flip default from 24bpp to 16bpp") it seems that this will have a wider impact beyond fbdev. 32bpp has been used since the Rockchip driver was added so I don't see any real need to change to 24 now. Regards, John