dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Sinclair Yeh <syeh@vmware.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Thomas Hellstrom <thellstrom@vmware.com>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	DRI Development <dri-devel@lists.freedesktop.org>,
	linux-graphics-maintainer@vmware.com,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH] drm/vmwgfx: Switch to mode_cmd2
Date: Fri, 2 Dec 2016 09:50:22 -0800	[thread overview]
Message-ID: <20161202175022.GA7368@ubuntu> (raw)
In-Reply-To: <20161202070022.j3h5qw3pstzrx2tv@phenom.ffwll.local>

On Fri, Dec 02, 2016 at 08:00:22AM +0100, Daniel Vetter wrote:
> On Thu, Dec 01, 2016 at 03:09:40PM -0800, Sinclair Yeh wrote:
> > One defect below otherwise:  Reviewed-by: Sinclair Yeh <syeh@vmware.com>
> > 
> > On Wed, Nov 30, 2016 at 06:00:04PM +0100, Daniel Vetter wrote:
> > > Surprisingly few changes needed to make it happen. Compile-tested
> > > only. The idea is that this replaces the 2 patches from Ville's big
> > > fb->format patch series as a prep patch. Only impact to later patches
> > > should be the one instace added in this patch where we look at
> > > fb->pixel_format (instead of fb->bpp and fb->depth), so minor
> > > adjustements in the cocci-generated patches needed.
> > > 
> > > Cc: ville.syrjala@linux.intel.com
> > > Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > > Cc: linux-graphics-maintainer@vmware.com
> > > Cc: Sinclair Yeh <syeh@vmware.com>
> > > Cc: Thomas Hellstrom <thellstrom@vmware.com>
> > > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> > > ---
> > >  drivers/gpu/drm/vmwgfx/vmwgfx_fb.c  |  18 +++---
> > >  drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 116 +++++++++++++-----------------------
> > >  drivers/gpu/drm/vmwgfx/vmwgfx_kms.h |   2 +-
> > >  3 files changed, 52 insertions(+), 84 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
> > > index d2d93959b119..4b1defc7aa6d 100644
> > > --- a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
> > > +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
> > > @@ -465,33 +465,33 @@ static int vmw_fb_kms_detach(struct vmw_fb_par *par,
> > >  
> > >  static int vmw_fb_kms_framebuffer(struct fb_info *info)
> > >  {
> > > -	struct drm_mode_fb_cmd mode_cmd;
> > > +	struct drm_mode_fb_cmd2 mode_cmd;
> > >  	struct vmw_fb_par *par = info->par;
> > >  	struct fb_var_screeninfo *var = &info->var;
> > >  	struct drm_framebuffer *cur_fb;
> > >  	struct vmw_framebuffer *vfb;
> > > -	int ret = 0;
> > > +	int ret = 0, depth;
> > >  	size_t new_bo_size;
> > >  
> > > -	ret = vmw_fb_compute_depth(var, &mode_cmd.depth);
> > > +	ret = vmw_fb_compute_depth(var, &depth);
> > >  	if (ret)
> > >  		return ret;
> > >  
> > >  	mode_cmd.width = var->xres;
> > >  	mode_cmd.height = var->yres;
> > > -	mode_cmd.bpp = var->bits_per_pixel;
> > > -	mode_cmd.pitch = ((mode_cmd.bpp + 7) / 8) * mode_cmd.width;
> > 
> > mode_cmd.pitches[0] needs to be initialized before being used below.
> > 
> > Maybe something like:
> > mode_cmd.pitches[0] = ((var->bits_per_pixel + 7) / 8) * mode_cmd.width;
> 
> Oh right, I deleted a bit too much here. Once fixed, ok if I merge this
> through drm-misc so that Ville can throw his fb->format conversion on top?

Sure, thanks for doing this!

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2016-12-02 17:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-30 17:00 [PATCH] drm/vmwgfx: Switch to mode_cmd2 Daniel Vetter
2016-12-01 23:09 ` Sinclair Yeh
2016-12-02  7:00   ` Daniel Vetter
2016-12-02 17:50     ` Sinclair Yeh [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-12-02  7:07 Daniel Vetter
2016-12-02 10:03 ` Ville Syrjälä

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=20161202175022.GA7368@ubuntu \
    --to=syeh@vmware.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-graphics-maintainer@vmware.com \
    --cc=thellstrom@vmware.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).