On 2017-06-16 01:03, Peter Rosin wrote:
> On 2017-06-16 01:01, Peter Rosin wrote:
>> So, is this below better? I'll follow-up with a patch I need for the
>> fbdev emulation to work.
> 
> Without adding gamma callbacks in drm_fb_helper_funcs I hit
> 
>       /*
>        * The driver really shouldn't advertise pseudo/directcolor
>        * visuals if it can't deal with the palette.
>        */
>       if (WARN_ON(!fb_helper->funcs->gamma_set ||
>                   !fb_helper->funcs->gamma_get))
>               return -EINVAL;
> 
> in drm_fb_helper.c:setcolreg(), so I need this patch which basically
> exposes some guts from fbdev_cma and glues it with the new clut
> handling in the atmel_hlcdc driver.
> 
> Cheers,
> peda
> +
> +/**
> + * drm_fbdev_cma_init_with_funcs() - Allocate and initializes a 
> drm_fbdev_cma struct
> + * @dev: DRM device
> + * @preferred_bpp: Preferred bits per pixel for the device
> + * @max_conn_count: Maximum number of connectors
> + * @framebuffer_funcs: framebuffer functions, in particular a custom dirty() 
> callback
> + *
> + * Returns a newly allocated drm_fbdev_cma struct or a ERR_PTR.
> + */
> +struct drm_fbdev_cma *drm_fbdev_cma_init_with_funcs(struct drm_device *dev,
> +     unsigned int preferred_bpp, unsigned int max_conn_count,
> +     const struct drm_framebuffer_funcs *framebuffer_funcs)
> +{
> +     return drm_fbdev_cma_init_with_funcs2(dev, preferred_bpp,
> +                                           max_conn_count,
> +                                           funcs, NULL);

s/funcs/framebuffer_funcs/

Sorry about that. I'm planning to resend this as a series anyway with proper
commit messages and signoffs etc.

Cheers,
peda

> +}
>  EXPORT_SYMBOL_GPL(drm_fbdev_cma_init_with_funcs);
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to