[PATCH 5/5] drm/exynos: Add plane support with fimd

Joonyoung Shim jy0922.shim at samsung.com
Mon Dec 12 16:13:41 PST 2011


On 12/13/2011 07:48 AM, Rob Clark wrote:
> On Fri, Dec 9, 2011 at 4:59 AM, Inki Dae<inki.dae at samsung.com>  wrote:
>> +static int
>> +exynos_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
>> +                    struct drm_framebuffer *fb, int crtc_x, int crtc_y,
>> +                    unsigned int crtc_w, unsigned int crtc_h,
>> +                    uint32_t src_x, uint32_t src_y,
>> +                    uint32_t src_w, uint32_t src_h)
>> +{
>> +       struct exynos_plane *exynos_plane =
>> +               container_of(plane, struct exynos_plane, base);
>> +       struct exynos_drm_overlay *overlay =&exynos_plane->overlay;
>> +       struct exynos_drm_crtc_pos pos;
>> +       int ret;
>> +
>> +       DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__);
>> +
>> +       memset(&pos, 0, sizeof(struct exynos_drm_crtc_pos));
>> +       pos.crtc_x = crtc_x;
>> +       pos.crtc_y = crtc_y;
>> +       pos.crtc_w = crtc_w;
>> +       pos.crtc_h = crtc_h;
>> +
>> +       pos.fb_x = src_x;
>> +       pos.fb_y = src_y;
> also, I think src_x/src_y should be interpreted at 16.16/Q16 fixed
> point.  But elsewhere were I see fb_x/y used it, it doesn't appear to
> be interpreted this way.

Right, this will be fixed.

Thanks.

> Also, I *think* that comment was meant to apply to src_h/src_w
> (Jesse?), but you seem to ignore these parameters..
>
> BR,
> -R
>
>
>> +
>> +       /* TODO: scale feature */
>> +       ret = exynos_drm_overlay_update(overlay, fb,&crtc->mode,&pos);
>> +       if (ret<  0)
>> +               return ret;
>> +
>> +       exynos_drm_fn_encoder(crtc, overlay,
>> +                       exynos_drm_encoder_crtc_mode_set);
>> +       exynos_drm_fn_encoder(crtc,&overlay->zpos,
>> +                       exynos_drm_encoder_crtc_plane_commit);
>> +
>> +       exynos_plane->enabled = true;
>> +
>> +       return 0;
>> +}
>> +
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>



More information about the dri-devel mailing list