Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4322760pxb; Thu, 14 Oct 2021 03:02:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwV5LCqIorwiTLrp23yk8mWSIIEf9/F0z0xW9D6B14npbyGYs/7O7n1Yh85MeEpaRs04jJI X-Received: by 2002:a17:907:c0c:: with SMTP id ga12mr2533670ejc.111.1634205735106; Thu, 14 Oct 2021 03:02:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634205735; cv=none; d=google.com; s=arc-20160816; b=mUB8/ukjoYX9pj710/AawsfK74UkQr5FD6e9Q7b0MYOZikXRzC85XK8Rm3b0nBRKW6 nu8IbYp44rrhurHUhyGUO0LOmaJriKqu6KZRX2gL3NQnOiiJOaiYtexriEabqr2JRqXF xLN5Lk1oWTXycUIIOSjiRh2hOxJdkK2+JnIqzdoMnnzoApV8jpU0fNPoLmMFFmQ+YzKo gOwLex2tG5NNL48VK6ukrc7MtU8kFNDqVyDxWGuBuglC1ixwJfx8tdM23kTqMmiuGOSx y2Ln4JTWxjTHnrM/nKtQKM9plYU4qHUdUXzvELkraZDhOG5OBBdm5qHWVvIzHlpPySeS Au9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=OZvA6vOCLe0vq1IOFdw9MbIuy04wehYkABusPOOkvWs=; b=s5mw+AzAL8RaYJkJ5sBd64YMdkCim0wQhBu4+r6Q2+aSeB/Aw7oXJOqJlJALdSXs9j Cj5LqcRs9vlOArZUe8ad+VOi/xb+Zkh4FarBXubrcFZQdl8LURQJ/RJd9lUN1Fup2xuF lG1u7bEpon9tvCp0Dlmck5TqX++/NPCLmOqD1SV4ZDvBsEYulkXzhfHWPLooTbt2QFza iIQ4Y7svQPzZLNfK50fv1ERl0Vl+b2VswiqVveHhxD1cLdHF8Og6PcRgUrfdsH0cHKeE b/ObMI0WIkvK6SUa7jVhsKnfcSD+QkPB2v46+7OOzJOg2MBB3Gq+u0nj8Lm8TQCPj2Ma iN1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=nj99OwYt; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y89si2888572ede.267.2021.10.14.03.01.47; Thu, 14 Oct 2021 03:02:15 -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 header.i=@gmail.com header.s=20210112 header.b=nj99OwYt; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230032AbhJNJ7Z (ORCPT + 99 others); Thu, 14 Oct 2021 05:59:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229468AbhJNJ7Y (ORCPT ); Thu, 14 Oct 2021 05:59:24 -0400 Received: from mail-io1-xd36.google.com (mail-io1-xd36.google.com [IPv6:2607:f8b0:4864:20::d36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21A4FC061570 for ; Thu, 14 Oct 2021 02:57:20 -0700 (PDT) Received: by mail-io1-xd36.google.com with SMTP id p68so3010733iof.6 for ; Thu, 14 Oct 2021 02:57:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=OZvA6vOCLe0vq1IOFdw9MbIuy04wehYkABusPOOkvWs=; b=nj99OwYtQYofo66YE9oGGAlKqR0StH4OFhjgnBjjRxq2BTK0hKdKl+0xq5V4qslSSS vK4CecV8dQlgQoKNOlmmgXmQARHrO/R0W5JKOtvGpdJDTq0TL5LYftjAhG4tthO6nYzK TgxcSUrmgtR/NkokI1+EOFLoIw5UxFoyT+rCG7bRJ+6dkUU9fEyF8Ss1mqOVueOHLyWe HUV03WhwIRM9PKHtgn62irGapZhKVmJz006wMlRGbkn4c0eQX/gHG6IuStGinBVeYgUp jFca117fHhpvzir6AvfrJPYX0ZjiIk5Gnhfuho+dA3GZJL7OJsvCBQ7nrhpF/7GJYsgV PwmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OZvA6vOCLe0vq1IOFdw9MbIuy04wehYkABusPOOkvWs=; b=WxDN5nO4j102jrIamnO9C9/z47daS4yeHsIeq22DLcLEvmJ+iUUeiYxf76qZ92h/Bq Xb0rxBM6vn0aKv8tEWFjMilDhB+rGJIn7/FpFT6cLN+kaJYYoB57sXv3RA38B3PxK6Jk ljQ7X4Vpn+pl0ivnxiZHANMPQlaYjfyz7rlH8+4zgaVumwQ6GBKXdgC5lqSyYrHdQYIj w8ZEQ1mhBL2xSZx0X8pb3J6U8qbxpjYEO6SjgLXHderq3q2lgEtzAXEWc+1L2YNjXg+y iMKp3rrXyF36jzIs9nb/ejN6mpzM1zSy9Pi7JyKbUWvDVYXJmKIF9jYGPgNvau+TxzKD hlTg== X-Gm-Message-State: AOAM533uI95PrcOvO41fi+e7hmp/AM3NeljmGOtpQXRW8TKNEyl1yzOG 7OJ8xEu1bRtD0rS2a0KXlb8rSjorZm+IHKZXVZk= X-Received: by 2002:a02:2124:: with SMTP id e36mr3327316jaa.35.1634205439528; Thu, 14 Oct 2021 02:57:19 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Alistair Francis Date: Thu, 14 Oct 2021 19:56:00 +1000 Message-ID: Subject: Re: Revert "video: fbdev: mxsfb: Remove driver" To: Sam Ravnborg Cc: Marek Vasut , Fabio Estevam , Shawn Guo , Sascha Hauer , dl-linux-imx , b.zolnierkie@samsung.com, Linux Kernel Mailing List , Alistair Francis Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 20, 2021 at 8:36 AM Alistair Francis wrote: > > On Fri, Aug 20, 2021 at 1:43 AM Sam Ravnborg wrote: > > > > Hi Alistair, > > > > On Thu, Aug 19, 2021 at 07:10:00PM +1000, Alistair Francis wrote: > > > On Thu, Aug 19, 2021 at 4:38 AM Sam Ravnborg wrote: > > > > > > > > Hi Alistair, > > > > > > > > > > > > > > These are the EINVAL strace tells me in the not working case: > > > > > > > > > > prctl(PR_CAPBSET_READ, 0x30 /* CAP_??? */) = -1 EINVAL (Invalid argument) > > > > > prctl(PR_CAPBSET_READ, 0x2c /* CAP_??? */) = -1 EINVAL (Invalid argument) > > > > > prctl(PR_CAPBSET_READ, 0x2a /* CAP_??? */) = -1 EINVAL (Invalid argument) > > > > > prctl(PR_CAPBSET_READ, 0x29 /* CAP_??? */) = -1 EINVAL (Invalid argument) > > > > > ioctl(5, FBIOPUT_VSCREENINFO, 0x4ce8e0) = -1 EINVAL (Invalid argument) > > > > > > > > > > I'm guessing it's related to FBIOPUT_VSCREENINFO then, is that > > > > > something that could be added to the DRM emulation? > > > > > > > > If it turns out FBIOPUT_VSCREENINFO is the culprint it would also be > > > > good to know why we see EINVAL. > > > > One way is to sprinkle a number of printk's in fb_set_var(), > > > > then you can see how far you get before it fails. > > > > > > Thanks for the help. > > > > > > I see this line: > > > > > > ret = info->fbops->fb_check_var(var, info); > > > > > > in fb_set_var() > > > > > > returning early. > > > > Super, then next step is to annotate drm_fb_helper_check_var() > > to see where it fails. > > Try this and let us know the result. > > Thanks! > > After adding some prints, I realised there are already some in there > that are disabled by default. After enabling them I see this: > > "fbdev emulation doesn't support changing the pixel clock, value of > pixclock is ignored" > > and > > "fb requested width/height/bpp can't fit in current fb request > 260x1408-32 (virtual 260x23936) > 334x1405-32" > > which returns EINVAL. > > This is where I'm confused though. The values 334 and 1405 are taken > from the vendor and in the working fbdev driver they are using the > same values. > > I tried to add a similar print to mxsfb_check_var() for the working > version, to check what the values are, but there doesn't seem to be > any equivalent of fb->width and friends. I dug into this some more. In the working mxsfb and non-working fbdev emulation the userspace software sets: xres: 260 yres: 1408 xres_virtual: 260 yres_virtual: 23936 That passes the old mxsfb_check_var() and works. While that fails the new fbdev emulation check. Even increasing the width and height from 334x14085 to 260x23936 doesn't help as I get a range of other errors and no display. Just removing the check also doesn't work and results in kernel panics. It seems there is some difference in handling the resolutions between the mxsfb driver and the fbdev emulation on the new DRM driver. I'm just not sure what the difference is. Alistair