Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 23291C2D0EA for ; Wed, 8 Apr 2020 12:04:51 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DE57320747 for ; Wed, 8 Apr 2020 12:04:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="OdPalx7x" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DE57320747 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6FD336EA44; Wed, 8 Apr 2020 12:04:50 +0000 (UTC) Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by gabe.freedesktop.org (Postfix) with ESMTPS id 51F506EA44 for ; Wed, 8 Apr 2020 12:04:49 +0000 (UTC) Received: by mail-wr1-x444.google.com with SMTP id a25so7542831wrd.0 for ; Wed, 08 Apr 2020 05:04:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=OBnPwGNSGc7YJF6/MDIm1ZT+7em3pqRoLIRd/7b9PxA=; b=OdPalx7xuX4cjKnOHWh9tRuE5bTeRqir5JEhzSbax2+5ltx0Bo82JE5nTq2jKSyUNo EnQyjl56VgC34kFmXVjM5F3zPYcSq2VER8j1v36UD8n+FNghQuOZRUpdlfu2ZIuYnOR3 0QpjV4mQsG1i9Sf/WuB0iVARtp9CBtX+ZYcK8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=OBnPwGNSGc7YJF6/MDIm1ZT+7em3pqRoLIRd/7b9PxA=; b=txhR2OyjvuNoG5NwR145sG6mAlyJx0+1AAZKjhYleEKy46DvrVWy1W3qZCMp6EIzR+ gXR7ptcNb5je9LYC8DcwR6mrIokP1nK8RTN3It8U/S2GgM22oiqRgpGDh65sNE2ru2oq 70PtiK9zaLifLNOy4umcglGcgp/QpMq8z+4iLiuXgDLze/svh0U5tGKTauO3RdaorYmr qNt3ysPcVnhQyLptJY2wF3kMWmr+CqzwwnETNhe1VCsYPFJwUJd3E4s5hOBytyLdN2b2 PXMaLYjW5tw666x7F9CsACkjHo/R6OtWhJ/0JcseJFGjnzwL9H5RevZJPVSuAV94cxVA Rb4g== X-Gm-Message-State: AGi0PuaoEqY4slhPhjTbbGmeXjpfYU/PgTLRHnNYDkvcIjSUK9t+bdYG tuoYY+ipvpMNmkS1iNU5W4j6/WoiUkE= X-Google-Smtp-Source: APiQypJXFUS9vFZ2P9v4AgkbysWA38eTSvtMPkZ8z0bqKgeLMkvmrgrnq8Osd1i+8L1IowleNPNkGQ== X-Received: by 2002:a5d:4d51:: with SMTP id a17mr8282635wru.317.1586347487880; Wed, 08 Apr 2020 05:04:47 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id a67sm6981132wmc.30.2020.04.08.05.04.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Apr 2020 05:04:46 -0700 (PDT) Date: Wed, 8 Apr 2020 14:04:44 +0200 From: Daniel Vetter To: Paul Cercueil Subject: Re: [PATCH v2 2/3] gpu/drm: ingenic: Switch emulated fbdev to 16bpp Message-ID: <20200408120444.GJ3456981@phenom.ffwll.local> Mail-Followup-To: Paul Cercueil , David Airlie , od@zcrc.me, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20200226043041.289764-1-paul@crapouillou.net> <20200226043041.289764-2-paul@crapouillou.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200226043041.289764-2-paul@crapouillou.net> X-Operating-System: Linux phenom 5.3.0-3-amd64 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , od@zcrc.me, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Wed, Feb 26, 2020 at 01:30:40AM -0300, Paul Cercueil wrote: > The fbdev emulation is only ever used on Ingenic SoCs to run old SDL1 > based games at 16bpp (rgb565). Recent applications generally talk to > DRM directly, and can request their favourite pixel format; so we can > make everybody happy by switching the emulated fbdev to 16bpp. > > v2: No change > > Signed-off-by: Paul Cercueil > --- > drivers/gpu/drm/ingenic/ingenic-drm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/ingenic/ingenic-drm.c b/drivers/gpu/drm/ingenic/ingenic-drm.c > index 5493a80d7d2f..3f8cc98d41fe 100644 > --- a/drivers/gpu/drm/ingenic/ingenic-drm.c > +++ b/drivers/gpu/drm/ingenic/ingenic-drm.c > @@ -807,7 +807,7 @@ static int ingenic_drm_probe(struct platform_device *pdev) > goto err_devclk_disable; > } > > - ret = drm_fbdev_generic_setup(drm, 32); > + ret = drm_fbdev_generic_setup(drm, 16); This will conflict with Thomas' work to remove the error code, so might need a rebase. Now for the patch itself your supposed to set drm_device->mode_config.preferred_bpp and leave this here as 0. That way userspace can also know what's the best option. Maybe in the future we could auto-compute the preferred_bpp from just taking the first format of the first primary plane, but atm not there. With the above change: Reviewed-by: Daniel Vetter > if (ret) > dev_warn(dev, "Unable to start fbdev emulation: %i", ret); > > -- > 2.25.0 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel