Linux-Rockchip Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: FUKAUMI Naoki <naoki@radxa.com>
Cc: dri-devel@lists.freedesktop.org, Sandy Huang <hjc@rock-chips.com>,
	linux-rockchip@lists.infradead.org,
	Michael Riesch <michael.riesch@wolfvision.net>,
	kernel@pengutronix.de, Robin Murphy <robin.murphy@arm.com>,
	Dan Johansen <strit@manjaro.org>,
	Daniel Stone <daniel@fooishbar.org>
Subject: Re: [PATCH v5 0/4] drm/rockchip: dw_hdmi: Add 4k@30 support
Date: Tue, 14 Feb 2023 16:43:04 +0100	[thread overview]
Message-ID: <20230214154304.GK10447@pengutronix.de> (raw)
In-Reply-To: <43BFE269C2D3B94A+72719122-bfdd-8e99-9176-a6f5e30abfb2@radxa.com>

On Mon, Feb 13, 2023 at 04:11:46PM +0900, FUKAUMI Naoki wrote:
> hi,
> 
> on my rk3399 boards(ROCK Pi 4B+ and ROCK 4C+), fb0 is configured as
> 1920x1080, and nothing is displayed... "no signal" on display.

I can confirm this.

First of all there is a stupid bug in my patch:

> +       if (vop->data->max_output.width && mode->hdisplay > vop->data->max_output.height)
> +               return MODE_BAD_HVALUE;

The comparison should be against the width here of course, not against
the height. Fixing this should at least allow you to display something
when a 1080p display is connected.

The other problem comes with the legacy fbdev emulation. I think failure
is pretty much expected here. The fbdev emulation happens to use the
VOPL to display a 4k picture, but the VOPL can only do up to 2560x1600
and so the mode is denied in vop_crtc_mode_valid(). Quoting Daniel Stone
on this topic:

> You've done the right thing. Userspace should detect this and try with
> alternative CRTC routing. The kernel shouldn't be trying to solve this
> problem.

Trying an alternative CRTC routing is exactly what the fbdev emulation
doesn't do. Now my "userspace" is in kernel and the kernel shouldn't try
to solve this problem. We're trapped :-/

Sascha

> 
> --
> FUKAUMI Naoki
> 
> On 2/8/23 18:08, Sascha Hauer wrote:
> > Some more small changes to this series, see changelog.
> > 
> > Sascha
> > 
> > Changes since v4:
> > - Use struct vop_reg to store resolutions
> > - Only check for valid clock rates when clock != NULL
> > 
> > Changes since v3
> > - Add patch to limit VOP resolutions to hardware capabilitie
> > 
> > Changes since v2:
> > - Use correct register values for mpll_cfg
> > - Add patch to discard modes we cannot achieve
> > 
> > Changes since v1:
> > - Allow non standard clock rates only on Synopsys phy as suggested by
> >    Robin Murphy
> > 
> > Sascha Hauer (4):
> >    drm/rockchip: vop: limit maximium resolution to hardware capabilities
> >    drm/rockchip: dw_hdmi: relax mode_valid hook
> >    drm/rockchip: dw_hdmi: Add support for 4k@30 resolution
> >    drm/rockchip: dw_hdmi: discard modes with unachievable pixelclocks
> > 
> >   drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c  | 41 ++++++++++++++++----
> >   drivers/gpu/drm/rockchip/rockchip_drm_vop.c  | 15 +++++++
> >   drivers/gpu/drm/rockchip/rockchip_drm_vop.h  |  6 +++
> >   drivers/gpu/drm/rockchip/rockchip_drm_vop2.h |  5 ---
> >   drivers/gpu/drm/rockchip/rockchip_vop_reg.c  | 18 +++++++++
> >   5 files changed, 73 insertions(+), 12 deletions(-)
> > 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

  reply	other threads:[~2023-02-14 15:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-08  9:08 [PATCH v5 0/4] drm/rockchip: dw_hdmi: Add 4k@30 support Sascha Hauer
2023-02-08  9:08 ` [PATCH v5 1/4] drm/rockchip: vop: limit maximium resolution to hardware capabilities Sascha Hauer
2023-02-08  9:08 ` [PATCH v5 2/4] drm/rockchip: dw_hdmi: relax mode_valid hook Sascha Hauer
2023-02-08  9:08 ` [PATCH v5 3/4] drm/rockchip: dw_hdmi: Add support for 4k@30 resolution Sascha Hauer
2023-02-08  9:08 ` [PATCH v5 4/4] drm/rockchip: dw_hdmi: discard modes with unachievable pixelclocks Sascha Hauer
2023-02-13  7:11 ` [PATCH v5 0/4] drm/rockchip: dw_hdmi: Add 4k@30 support FUKAUMI Naoki
2023-02-14 15:43   ` Sascha Hauer [this message]
2023-02-15  9:22     ` FUKAUMI Naoki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230214154304.GK10447@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=daniel@fooishbar.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hjc@rock-chips.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=michael.riesch@wolfvision.net \
    --cc=naoki@radxa.com \
    --cc=robin.murphy@arm.com \
    --cc=strit@manjaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox