Re: [PATCH 21/37] drm/i915: Populate fb->format early for inherited fbs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 30, 2016 at 04:42:23PM +0100, Daniel Vetter wrote:
> On Fri, Nov 18, 2016 at 09:52:57PM +0200, ville.syrjala@xxxxxxxxxxxxxxx wrote:
> > From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> > 
> > Make sure the framebuffer format info is available as early as possible
> > for fbs we inherit from the BIOS. This will allow us to use the fb as
> > if it was fully formed before we register it.
> > 
> > Cc: intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> > Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> > ---
> >  drivers/gpu/drm/i915/intel_display.c | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > index 74a638c8de61..c45da6766fff 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -8717,6 +8717,7 @@ i9xx_get_initial_plane_config(struct intel_crtc *crtc,
> >  	fourcc = i9xx_format_to_fourcc(pixel_format);
> >  	fb->pixel_format = fourcc;
> >  	fb->bits_per_pixel = drm_format_plane_cpp(fourcc, 0) * 8;
> > +	fb->format = drm_format_info(fourcc);
> >  
> >  	if (INTEL_GEN(dev_priv) >= 4) {
> >  		if (plane_config->tiling)
> > @@ -9748,6 +9749,7 @@ skylake_get_initial_plane_config(struct intel_crtc *crtc,
> >  				      val & PLANE_CTL_ALPHA_MASK);
> >  	fb->pixel_format = fourcc;
> >  	fb->bits_per_pixel = drm_format_plane_cpp(fourcc, 0) * 8;
> > +	fb->format = drm_format_info(fourcc);
> >  
> >  	tiling = val & PLANE_CTL_TILED_MASK;
> >  	switch (tiling) {
> > @@ -9863,6 +9865,7 @@ ironlake_get_initial_plane_config(struct intel_crtc *crtc,
> >  	fourcc = i9xx_format_to_fourcc(pixel_format);
> >  	fb->pixel_format = fourcc;
> >  	fb->bits_per_pixel = drm_format_plane_cpp(fourcc, 0) * 8;
> > +	fb->format = drm_format_info(fourcc);
> 
> Do we really want to hand-roll this all, or could we somehow reuse
> fill_fb_struct? Or will this all go away again?

Yeah, I think we'll want to flip all of this over to using
fill_fb_struct(). Just didn't have the energy to look into that yet,
and the series was already getting too long anyway. So figured I'd save
that for the next round.

> 
> I'll reserve judgement until the end, but this here looks correct ;-)
> 
> Reviewed-by: Daniel Vetter <daniel.vetter@xxxxxxxx>
> 
> >  
> >  	base = I915_READ(DSPSURF(pipe)) & 0xfffff000;
> >  	if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv)) {
> > -- 
> > 2.7.4
> > 
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel@xxxxxxxxxxxxxxxxxxxxx
> > https://lists.freedesktop.org/mailman/listinfo/dri-devel
> 
> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux