Re: [PATCH v3 4/9] drm/vkms: Add typedef and documentation for pixel_read and pixel_write functions

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

 



[...]

> > diff --git a/drivers/gpu/drm/vkms/vkms_plane.c b/drivers/gpu/drm/vkms/vkms_plane.c
> > index d5203f531d96..f68b1b03d632 100644
> > --- a/drivers/gpu/drm/vkms/vkms_plane.c
> > +++ b/drivers/gpu/drm/vkms/vkms_plane.c
> > @@ -106,6 +106,13 @@ static void vkms_plane_atomic_update(struct drm_plane *plane,
> >  		return;
> >  
> >  	fmt = fb->format->format;
> > +	pixel_read_t pixel_read = get_pixel_read_function(fmt);
> > +
> > +	if (!pixel_read) {
> > +		DRM_WARN("Pixel format is not supported by VKMS planes. State is inchanged\n");
> 
> s/inchanged/unchanged/

Thanks for this correction. See my answer to [1], I changed the message a 
bit.
[1]: https://lore.kernel.org/dri-devel/20240226133646.174d3fb2.pekka.paalanen@xxxxxxxxxxxxx/

Kind regards,
Louis Chauvet

> > +		return;
> > +	}
> > +
> >  	vkms_plane_state = to_vkms_plane_state(new_state);
> >  	shadow_plane_state = &vkms_plane_state->base;
> >  
> > @@ -124,7 +131,7 @@ static void vkms_plane_atomic_update(struct drm_plane *plane,
> >  	drm_rect_rotate(&frame_info->rotated, drm_rect_width(&frame_info->rotated),
> >  			drm_rect_height(&frame_info->rotated), frame_info->rotation);
> >  
> > -	vkms_plane_state->pixel_read = get_pixel_conversion_function(fmt);
> > +	vkms_plane_state->pixel_read = pixel_read;
> >  }
> >  
> >  static int vkms_plane_atomic_check(struct drm_plane *plane,
> > diff --git a/drivers/gpu/drm/vkms/vkms_writeback.c b/drivers/gpu/drm/vkms/vkms_writeback.c
> > index c8582df1f739..c92b9f06c4a4 100644
> > --- a/drivers/gpu/drm/vkms/vkms_writeback.c
> > +++ b/drivers/gpu/drm/vkms/vkms_writeback.c
> > @@ -140,6 +140,13 @@ static void vkms_wb_atomic_commit(struct drm_connector *conn,
> >  	if (!conn_state)
> >  		return;
> >  
> > +	pixel_write_t pixel_write = get_pixel_write_function(wb_format);
> > +
> > +	if (!pixel_write) {
> > +		DRM_WARN("Pixel format is not supported by VKMS writeback. State is inchanged\n");
> 
> Same here
> 
> Best Regards,
> ~Arthur Grillo
> 
> > +		return;
> > +	}
> > +
> >  	vkms_set_composer(&vkmsdev->output, true);
> >  
> >  	active_wb = conn_state->writeback_job->priv;
> > @@ -150,7 +157,7 @@ static void vkms_wb_atomic_commit(struct drm_connector *conn,
> >  	crtc_state->wb_pending = true;
> >  	spin_unlock_irq(&output->composer_lock);
> >  	drm_writeback_queue_job(wb_conn, connector_state);
> > -	active_wb->pixel_write = get_pixel_write_function(wb_format);
> > +	active_wb->pixel_write = pixel_write;
> >  	drm_rect_init(&wb_frame_info->src, 0, 0, crtc_width, crtc_height);
> >  	drm_rect_init(&wb_frame_info->dst, 0, 0, crtc_width, crtc_height);
> >  }
> > 

-- 
Louis Chauvet, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux