Re: [PATCHv6 6/6] drm/rockchip: Add support for afbc

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

 



Hi Andrzej,

On Tue, 3 Mar 2020 at 12:02, Andrzej Pietrasiewicz
<andrzej.p@xxxxxxxxxxxxx> wrote:

> +static struct drm_framebuffer *
> +rockchip_fb_create(struct drm_device *dev, struct drm_file *file,
> +                  const struct drm_mode_fb_cmd2 *mode_cmd)
> +{
> +       struct drm_afbc_framebuffer *afbc_fb;
> +       struct drm_framebuffer *ret;
> +
> +       afbc_fb = kzalloc(sizeof(*afbc_fb), GFP_KERNEL);
> +       if (!afbc_fb)
> +               return ERR_PTR(-ENOMEM);
> +
> +       ret = drm_gem_fb_init_with_funcs(dev, &afbc_fb->base, file, mode_cmd, &rockchip_drm_fb_funcs);
> +       if (IS_ERR_OR_NULL(ret)) {
Like with 1/6 this should be IS_ERR().


> +static bool rockchip_mod_supported(struct drm_plane *plane,
> +                                  u32 format, u64 modifier)
> +{
> +       if (WARN_ON(modifier == DRM_FORMAT_MOD_INVALID))

AFAICT this should never trigger. If it does nearly every DRM driver
will be broken.
Seems like you've copied this from malidp and another offender being meson.

Would suggest fixing the latter two (optional), but at the very least
let's avoid adding new instances.

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



[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