From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Ben Widawsky <ben@bwidawsk.net>
Cc: intel-gfx@lists.freedesktop.org,
Jason Ekstrand <jason@jlekstrand.net>,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/5] drm: Remove fb hsub/vsub alignment requirement
Date: Wed, 22 Mar 2017 20:33:09 +0200 [thread overview]
Message-ID: <20170322183309.GK31595@intel.com> (raw)
In-Reply-To: <20170321202622.GA18818@mail.bwidawsk.net>
On Tue, Mar 21, 2017 at 01:26:23PM -0700, Ben Widawsky wrote:
> On 17-03-21 20:12:15, Ville Syrjälä wrote:
> >From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> >Allow framebuffers dimesions to be misaligned w.r.t. the subsampling
> >factors. No real reason the core should have to enforce this, and
> >it definitely starts to cause us issues with the i915 CCS support.
> >So let's just lift the restriction.
> >
> >Let's start to round up when computing the color plane dimesions
> >so that we'll not end up with too low an estimate for the memory
> >requirements and whatnot.
> >
> >Cc: Ben Widawsky <ben@bwidawsk.net>
> >Cc: Jason Ekstrand <jason@jlekstrand.net>
> >Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Both 1 and 2 are:
> Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Thanks. I've pushed patches 1-3 to drm-misc-next. That just leaves
us with the i915 stuff to deal with.
>
> >---
> > drivers/gpu/drm/drm_framebuffer.c | 8 ++++----
> > 1 file changed, 4 insertions(+), 4 deletions(-)
> >
> >diff --git a/drivers/gpu/drm/drm_framebuffer.c b/drivers/gpu/drm/drm_framebuffer.c
> >index 1138f90a7d5d..69e4c1487420 100644
> >--- a/drivers/gpu/drm/drm_framebuffer.c
> >+++ b/drivers/gpu/drm/drm_framebuffer.c
> >@@ -132,7 +132,7 @@ static int fb_plane_width(int width,
> > if (plane == 0)
> > return width;
> >
> >- return width / format->hsub;
> >+ return DIV_ROUND_UP(width, format->hsub);
> > }
> >
> > static int fb_plane_height(int height,
> >@@ -141,7 +141,7 @@ static int fb_plane_height(int height,
> > if (plane == 0)
> > return height;
> >
> >- return height / format->vsub;
> >+ return DIV_ROUND_UP(height, format->vsub);
> > }
> >
> > static int framebuffer_check(const struct drm_mode_fb_cmd2 *r)
> >@@ -158,12 +158,12 @@ static int framebuffer_check(const struct drm_mode_fb_cmd2 *r)
> > return -EINVAL;
> > }
> >
> >- if (r->width == 0 || r->width % info->hsub) {
> >+ if (r->width == 0) {
> > DRM_DEBUG_KMS("bad framebuffer width %u\n", r->width);
> > return -EINVAL;
> > }
> >
> >- if (r->height == 0 || r->height % info->vsub) {
> >+ if (r->height == 0) {
> > DRM_DEBUG_KMS("bad framebuffer height %u\n", r->height);
> > return -EINVAL;
> > }
> >--
> >2.10.2
> >
--
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-03-22 18:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-21 18:12 [PATCH v3 0/5] drm/i915: SKL+ render decompression support ville.syrjala
2017-03-21 18:12 ` [PATCH 1/5] drm: Share the code to compute color plane dimesions ville.syrjala
2017-03-21 18:12 ` [PATCH 2/5] drm: Remove fb hsub/vsub alignment requirement ville.syrjala
2017-03-21 20:26 ` Ben Widawsky
2017-03-22 18:33 ` Ville Syrjälä [this message]
2017-03-21 18:12 ` [PATCH v3 3/5] drm: Add mode_config .get_format_info() hook ville.syrjala
2017-03-21 18:12 ` [PATCH v4 4/5] drm/i915: Implement .get_format_info() hook for CCS ville.syrjala
2017-03-21 18:12 ` [PATCH v4 5/5] drm/i915: Add render decompression support ville.syrjala
2017-03-23 14:28 ` [PATCH v3 0/5] drm/i915: SKL+ " Daniel Stone
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=20170322183309.GK31595@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=ben@bwidawsk.net \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jason@jlekstrand.net \
/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).