From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-fbdev@vger.kernel.org, David Lechner <david@lechnology.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
"open list:DRM PANEL DRIVERS" <dri-devel@lists.freedesktop.org>,
Dave Airlie <airlied@redhat.com>,
Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] drm/fb-helper: Scale back depth to supported maximum
Date: Fri, 02 Feb 2018 14:03:43 +0000 [thread overview]
Message-ID: <20180202140343.GX5453@intel.com> (raw)
In-Reply-To: <CACRpkdaFyKYxnVB-QuUiT+G9QcrpyPkzd2KXUm1sWNSgzyF9AA@mail.gmail.com>
On Fri, Feb 02, 2018 at 02:56:30PM +0100, Linus Walleij wrote:
> On Thu, Feb 1, 2018 at 2:19 PM, Ville Syrjälä
> <ville.syrjala@linux.intel.com> wrote:
> > [Me]
> >> + /*
> >> + * If we run into a situation where, for example, the primary plane
> >> + * supports RGBA5551 (16 bpp, depth 15) but not RGB565 (16 bpp, depth
> >> + * 16) we need to scale down the depth of the sizes we request.
> >> + */
> >> + drm_for_each_plane(plane, fb_helper->dev) {
> >> + /* Only check the primary plane */
> >> + if (plane->type != DRM_PLANE_TYPE_PRIMARY)
> >> + continue;
> >
> > I think this should look at crtc->primary for each of the crtcs managed
> > by the fb_helper.
> >
> > Also this probably shouldn't look at YUV formats at all?
>
> I guess I can look into doing it this way, sorry for not knowing how to
> properly inspect DRM objects, I'm lost sometimes...
>
> > I do wonder if instead we should just have the driver specify the
> > pixel format explicitly instead of trying to guess based on bpp?
>
> That makes a lot more sense to me actually. It would
> give a better sense of control so the driver feel it knows
> what is actually going on.
>
> So I would just update
> drm_fb_cma_fbdev_init() and drm_fb_helper_initial_config()
> to pass a reasonable pixel format instead and refactor all the
> way down?
Yeah, something along those lines would seem like the better approach
to me. But it's been a while since I've looked at this code so I might
be totally wrong :)
>
> It does hit a lot of code on the way, but if everyone thinks this
> is a good idea I can very well take a stab at it.
>
> Yours,
> Linus Walleij
--
Ville Syrjälä
Intel OTC
next prev parent reply other threads:[~2018-02-02 14:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-01 13:04 [PATCH] drm/fb-helper: Scale back depth to supported maximum Linus Walleij
2018-02-01 13:19 ` Ville Syrjälä
2018-02-01 15:15 ` Noralf Trønnes
2018-02-01 15:30 ` Noralf Trønnes
2018-02-02 13:56 ` Linus Walleij
2018-02-02 14:03 ` Ville Syrjälä [this message]
2018-02-19 9:10 ` Daniel Vetter
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=20180202140343.GX5453@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=airlied@redhat.com \
--cc=b.zolnierkie@samsung.com \
--cc=david@lechnology.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-fbdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).