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=-13.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 66B8CC4361B for ; Fri, 11 Dec 2020 16:21:47 +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 21CD323EB1 for ; Fri, 11 Dec 2020 16:21:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 21CD323EB1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com 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 264D06E479; Fri, 11 Dec 2020 16:21:46 +0000 (UTC) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by gabe.freedesktop.org (Postfix) with ESMTPS id D07296E479 for ; Fri, 11 Dec 2020 16:21:44 +0000 (UTC) IronPort-SDR: qIhSLAl7Ujw/YxdaT3+WvIpKk3czpfyvXLh0bpDCoenv7mhWi/vq892FDX/25kd8euLxXYgTHq jFSv3hv6ZeJg== X-IronPort-AV: E=McAfee;i="6000,8403,9832"; a="153691115" X-IronPort-AV: E=Sophos;i="5.78,411,1599548400"; d="scan'208";a="153691115" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Dec 2020 08:21:44 -0800 IronPort-SDR: YVggXw13HtOY+s630JDvBcMyjxmEM2cxSjvQiX6F93HSeH3aMbTZ2ChFIGGc2JXU6h/O0SvY20 bocQRHLtJnXg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,411,1599548400"; d="scan'208";a="376593066" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by orsmga007.jf.intel.com with SMTP; 11 Dec 2020 08:21:40 -0800 Received: by stinkbox (sSMTP sendmail emulation); Fri, 11 Dec 2020 18:21:40 +0200 Date: Fri, 11 Dec 2020 18:21:40 +0200 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Daniel Vetter Subject: Re: [PATCH 1/2] drm/vkms: Unset preferred_depth Message-ID: References: <20201211161113.3350061-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201211161113.3350061-1-daniel.vetter@ffwll.ch> X-Patchwork-Hint: comment 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: Melissa Wen , Haneen Mohammed , Rodrigo Siqueira , DRI Development , Daniel Vetter Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Fri, Dec 11, 2020 at 05:11:12PM +0100, Daniel Vetter wrote: > There's a confusion between the preferred_depth uapi and the generic > fbdev helpers. Former wants depth, latter wants bpp, and for XRGB8888 > they don't match. Which hit me with vkms, which wants that. > = > All other drivers setting this and using the generic fbdev helpers use > 16, where both numbers match, for RGB565. > = > Since fixing this is a bit involved (I think for atomic drivers we > should just compute this all internally from the format list of the > first primary plane) paper over the issue in vkms by using defaults > everywhere. Then userspace will pick XRGB8888, and fbdev helpers will > do the same, and we have what we want. I think I had a patch ages ago that tried to improve the fb_helper pixel format stuff a bit. This one I think: https://patchwork.freedesktop.org/patch/203189/ Haven't checked how much of that would still be relevant though. > = > Reported-by: Simon Ser > Reviewed-by: Simon Ser > Cc: Simon Ser > Signed-off-by: Daniel Vetter > Cc: Rodrigo Siqueira > Cc: Melissa Wen > Cc: Haneen Mohammed > Cc: Daniel Vetter > --- > drivers/gpu/drm/vkms/vkms_drv.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > = > diff --git a/drivers/gpu/drm/vkms/vkms_drv.c b/drivers/gpu/drm/vkms/vkms_= drv.c > index d4d39227f2ed..aef29393b811 100644 > --- a/drivers/gpu/drm/vkms/vkms_drv.c > +++ b/drivers/gpu/drm/vkms/vkms_drv.c > @@ -113,7 +113,10 @@ static int vkms_modeset_init(struct vkms_device *vkm= sdev) > dev->mode_config.max_height =3D YRES_MAX; > dev->mode_config.cursor_width =3D 512; > dev->mode_config.cursor_height =3D 512; > - dev->mode_config.preferred_depth =3D 32; > + /* FIXME: There's a confusion between bpp and depth between this and > + * fbdev helpers. We have to go with 0, meaning "pick the default", > + * which ix XRGB8888 in all cases. */ > + dev->mode_config.preferred_depth =3D 0; > dev->mode_config.helper_private =3D &vkms_mode_config_helpers; > = > return vkms_output_init(vkmsdev, 0); > -- = > 2.29.2 > = > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- = Ville Syrj=E4l=E4 Intel _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel