From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Russell King - ARM Linux <linux@armlinux.org.uk>
Cc: Mali DP Maintainers <malidp@foss.arm.com>,
Liviu Dudau <liviu.dudau@arm.com>,
linux-arm-kernel@lists.infradead.org,
dri-devel@lists.freedesktop.org
Subject: Re: [BUG] hdlcd gets confused about base address
Date: Wed, 22 Feb 2017 17:42:30 +0200 [thread overview]
Message-ID: <20170222154230.GJ31595@intel.com> (raw)
In-Reply-To: <20170220185948.GR21222@n2100.armlinux.org.uk>
On Mon, Feb 20, 2017 at 06:59:49PM +0000, Russell King - ARM Linux wrote:
> On Mon, Feb 20, 2017 at 08:05:58PM +0200, Ville Syrjälä wrote:
> > This stuff should be using the clipped coordinates, not the user
> > coordinates. And it doesn't look like this guy is even calling the
> > clip helper thing.
> >
> > malidp seems to be calling that thing, but it still doesn't
> > manage to program the hw with the right coordinates from what
> > I can see.
> >
> > /me feels a bit like a broken record...
>
> If you mean drm_plane_helper_check_state(), then...
>
> $ grep drm_plane_helper_check_state Documentation/gpu/ -r
>
> So nothing there... but in drivers/gpu/drm/drm_plane_helper.c, there's
> the following, and I think this really isn't helping people understand
> what's required:
>
> * This helper library has two parts. The first part has support to implement
> * primary plane support on top of the normal CRTC configuration interface.
> * Since the legacy ->set_config interface ties the primary plane together with
> * the CRTC state this does not allow userspace to disable the primary plane
> * itself. To avoid too much duplicated code use
> * drm_plane_helper_check_update() which can be used to enforce the same
> * restrictions as primary planes had thus. The default primary plane only
> * expose XRBG8888 and ARGB8888 as valid pixel formats for the attached
> * framebuffer.
> *
> * Drivers are highly recommended to implement proper support for primary
> * planes, and newly merged drivers must not rely upon these transitional
> * helpers.
>
> Which functions are defined as "these transitional helpers" - the above
> is rather ambiguous. Is drm_plane_helper_check_state() a "transitional
> helper" or is it not? (It probably isn't, but the documentation does not
> make that clear.)
Nope. And I guess we might want to move it into some atomic code
instead. IIRC Daniel even suggested that but I was too lazy to do it at
the time.
>
> It then goes on to:
>
> * The second part also implements transitional helpers which allow drivers to
>
> So maybe the second paragraph needs to be moved after this line to
> remove the confusion?
>
> If you find that you're repeating something to many people, it's always
> a good idea to re-read the documentation that's supposed to be giving
> people guidance.
Docs are such a new thing. I've not ever read them through myself TBH.
>
> Now, when you say that we're supposed to program "clipped coordinates"
> maybe you can give a hint what those are and where they come from?
> Is that the vaguely documented "clip" parameter in
> drm_plane_helper_check_state() ?
>
> * @clip: integer clipping coordinatesa
/**
* struct drm_plane_state - mutable plane state
...
* @src: clipped source coordinates of the plane (in 16.16)
* @dst: clipped destination coordinates of the plane
>
> If it is, that doesn't really describe it, and neither does the
> description of what the function does, nor what it returns:
>
> * Checks that a desired plane update is valid. Drivers that provide
> * their own plane handling rather than helper-provided implementations may
> * still wish to call this function to avoid duplication of error checking
> * code.
> *
> * RETURNS:
> * Zero if update appears valid, error code on failure
>
> So, some improvement there could go a long way towards eliminating
> some of these issues...
>
> Atomic modeset is hideously complex... having poor documentation doesn't
> help.
>
> --
> RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
> FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
> according to speedtest.net.
--
Ville Syrjälä
Intel OTC
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2017-02-22 15:42 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-18 23:37 [BUG] hdlcd gets confused about base address Russell King - ARM Linux
2016-11-21 9:44 ` Daniel Vetter
2016-11-21 11:06 ` Liviu Dudau
2016-11-21 11:20 ` Russell King - ARM Linux
2016-11-21 11:32 ` Liviu Dudau
2016-11-21 12:25 ` Russell King - ARM Linux
2016-11-21 12:56 ` Liviu Dudau
2016-11-21 13:24 ` Russell King - ARM Linux
2016-11-21 13:50 ` Liviu Dudau
2016-11-21 14:03 ` Russell King - ARM Linux
2016-11-21 17:32 ` Liviu Dudau
2016-11-21 17:56 ` Russell King - ARM Linux
2016-11-21 18:16 ` Russell King - ARM Linux
2016-11-21 18:25 ` Liviu Dudau
2016-11-21 18:23 ` Liviu Dudau
2016-11-21 18:43 ` Russell King - ARM Linux
2016-11-21 14:30 ` Russell King - ARM Linux
2016-11-21 14:55 ` Russell King - ARM Linux
2016-11-22 7:02 ` Daniel Vetter
2017-02-20 12:16 ` Russell King - ARM Linux
2017-02-20 17:53 ` Liviu Dudau
2017-02-20 17:57 ` Russell King - ARM Linux
2017-02-20 18:05 ` Ville Syrjälä
2017-02-20 18:59 ` Russell King - ARM Linux
2017-02-22 15:42 ` Ville Syrjälä [this message]
2017-02-26 19:31 ` Daniel Vetter
2017-02-22 15:15 ` Liviu Dudau
2017-02-22 15:30 ` Ville Syrjälä
2017-03-08 16:30 ` [PATCH v2] drm: hdlcd: Fix the calculation of the scanout start address Liviu Dudau
2017-03-31 9:49 ` Russell King - ARM Linux
2017-03-31 9:51 ` [PATCH 1/3] drm/arm: hdlcd: properly validate plane state Russell King
2017-03-31 10:18 ` Liviu Dudau
2017-03-31 10:20 ` Russell King - ARM Linux
2017-03-31 10:23 ` Liviu Dudau
2017-03-31 10:27 ` Russell King - ARM Linux
2017-03-31 11:41 ` Liviu Dudau
2017-03-31 12:21 ` Russell King - ARM Linux
2017-03-31 9:51 ` [PATCH 2/3] drm/arm: hdlcd: fix plane base address calculation Russell King
2017-03-31 13:13 ` Liviu Dudau
2017-03-31 9:51 ` [PATCH 3/3] drm/arm: hdlcd: check for rotation Russell King
2017-03-31 10:11 ` Ville Syrjälä
2017-03-31 10:21 ` Liviu Dudau
2017-03-31 13:18 ` [PATCH v2] drm: hdlcd: Fix the calculation of the scanout start address Liviu Dudau
2017-03-31 13:48 ` Russell King - ARM Linux
2017-04-03 10:31 ` Liviu Dudau
2017-04-03 13:13 ` Russell King - ARM Linux
2017-04-03 14:07 ` Liviu Dudau
2017-04-06 11:07 ` Jani Nikula
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=20170222154230.GJ31595@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux@armlinux.org.uk \
--cc=liviu.dudau@arm.com \
--cc=malidp@foss.arm.com \
/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).