From: Ivan Mironov <mironov.ivan@gmail.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <maxime.ripard@bootlin.com>,
Sean Paul <sean@poorly.run>, David Airlie <airlied@linux.ie>,
saahriktu <mail@saahriktu.org>,
Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Subject: Re: [RFC PATCH 1/2] drm/fb-helper: Bring back workaround for bugs of SDL 1.2
Date: Fri, 28 Dec 2018 04:26:56 +0500 [thread overview]
Message-ID: <00547df7d87c7fe6d8c842d5b29a0cd6809cdf5d.camel@gmail.com> (raw)
In-Reply-To: <20181227120046.GC9058@dvetter-linux.ger.corp.intel.com>
On Thu, 2018-12-27 at 13:00 +0100, Daniel Vetter wrote:
> > + /*
> > + * Workaround for SDL 1.2, which is known to be setting all pixel format
> > + * fields values to zero in some cases. We treat this situation as a
> > + * kind of "use some reasonable autodetected values".
> > + */
> > + if (!var->red.offset && !var->green.offset &&
> > + !var->blue.offset && !var->transp.offset &&
> > + !var->red.length && !var->green.length &&
> > + !var->blue.length && !var->transp.length &&
> > + !var->red.msb_right && !var->green.msb_right &&
> > + !var->blue.msb_right && !var->transp.msb_right) {
> > + u8 depth;
> > +
> > + /*
> > + * There is no way to guess the right value for depth when
> > + * bpp is 16 or 32. So we just restore the behaviour previously
> > + * introduced here by commit 785b93ef8c309. In fact, this was
> > + * implemented even earlier in various device drivers.
> > + */
> > + switch (var->bits_per_pixel) {
> > + case 16:
> > + depth = 15;
> > + break;
> > + case 32:
> > + depth = 24;
> > + break;
> > + default:
> > + depth = var->bits_per_pixel;
> > + break;
> > + }
>
> The guesswork here looks fishy. We should still have the drm-side format,
> and should use that.
This existed for a very long time until problematic commit was applied.
And there is a clear evidence that it was actually used by
applications.
> Otherwise the patches look good I think, but they
> need a Fixes: tag and cc: stable so backporters know what to do with
> these.
>
I added "cc: stable" into the regression fix. Also added more info into
the commit messages. See the PATCH v1 in the mailing list.
Thanks.
next prev parent reply other threads:[~2018-12-27 23:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-26 12:11 [RFC PATCH 0/2] Fix SDL 1.2 on emulated fbdev devices (broken in kernels >=4.19) Ivan Mironov
2018-12-26 12:11 ` [RFC PATCH 1/2] drm/fb-helper: Bring back workaround for bugs of SDL 1.2 Ivan Mironov
2018-12-27 12:00 ` Daniel Vetter
2018-12-27 12:00 ` Daniel Vetter
2018-12-27 23:26 ` Ivan Mironov [this message]
2018-12-28 12:02 ` Daniel Vetter
2018-12-26 12:11 ` [RFC PATCH 2/2] drm/fb-helper: Ignore the value of fb_var_screeninfo.pixclock Ivan Mironov
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=00547df7d87c7fe6d8c842d5b29a0cd6809cdf5d.camel@gmail.com \
--to=mironov.ivan@gmail.com \
--cc=Eugeniy.Paltsev@synopsys.com \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mail@saahriktu.org \
--cc=maxime.ripard@bootlin.com \
--cc=sean@poorly.run \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.