struct mdp5_plane {
struct drm_plane base;
- const char *name;
enum mdp5_pipe pipe;
static int mdp5_plane_prepare_fb(struct drm_plane *plane,
struct drm_plane_state *new_state)
{
- struct mdp5_plane *mdp5_plane = to_mdp5_plane(plane);
struct mdp5_kms *mdp5_kms = get_kms(plane);
struct drm_framebuffer *fb = new_state->fb;
if (!new_state->fb)
return 0;
- DBG("%s: prepare: FB[%u]", mdp5_plane->name, fb->base.id);
+ DBG("%s: prepare: FB[%u]", plane->name, fb->base.id);
return msm_framebuffer_prepare(fb, mdp5_kms->id);
}
static void mdp5_plane_cleanup_fb(struct drm_plane *plane,
struct drm_plane_state *old_state)
{
- struct mdp5_plane *mdp5_plane = to_mdp5_plane(plane);
struct mdp5_kms *mdp5_kms = get_kms(plane);
struct drm_framebuffer *fb = old_state->fb;
if (!fb)
return;
- DBG("%s: cleanup: FB[%u]", mdp5_plane->name, fb->base.id);
+ DBG("%s: cleanup: FB[%u]", plane->name, fb->base.id);
msm_framebuffer_cleanup(fb, mdp5_kms->id);
}
const struct mdp_format *format;
bool vflip, hflip;
- DBG("%s: check (%d -> %d)", mdp5_plane->name,
+ DBG("%s: check (%d -> %d)", plane->name,
plane_enabled(old_state), plane_enabled(state));
if (plane_enabled(state)) {
/* we cannot change SMP block configuration during scanout: */
bool full_modeset = false;
if (state->fb->pixel_format != old_state->fb->pixel_format) {
- DBG("%s: pixel_format change!", mdp5_plane->name);
+ DBG("%s: pixel_format change!", plane->name);
full_modeset = true;
}
if (state->src_w != old_state->src_w) {
- DBG("%s: src_w change!", mdp5_plane->name);
+ DBG("%s: src_w change!", plane->name);
full_modeset = true;
}
if (to_mdp5_plane_state(old_state)->pending) {
- DBG("%s: still pending!", mdp5_plane->name);
+ DBG("%s: still pending!", plane->name);
full_modeset = true;
}
if (full_modeset) {
struct mdp5_plane *mdp5_plane = to_mdp5_plane(plane);
struct drm_plane_state *state = plane->state;
- DBG("%s: update", mdp5_plane->name);
+ DBG("%s: update", plane->name);
if (!plane_enabled(state)) {
to_mdp5_plane_state(state)->pending = true;
src_w = src_w >> 16;
src_h = src_h >> 16;
- DBG("%s: FB[%u] %u,%u,%u,%u -> CRTC[%u] %d,%d,%u,%u", mdp5_plane->name,
+ DBG("%s: FB[%u] %u,%u,%u,%u -> CRTC[%u] %d,%d,%u,%u", plane->name,
fb->base.id, src_x, src_y, src_w, src_h,
crtc->base.id, crtc_x, crtc_y, crtc_w, crtc_h);
if (mdp5_kms->smp) {
if (plane_enabled(plane->state)) {
- DBG("%s: complete flip", mdp5_plane->name);
+ DBG("%s: complete flip", plane->name);
mdp5_smp_commit(mdp5_kms->smp, pipe);
} else {
- DBG("%s: free SMP", mdp5_plane->name);
+ DBG("%s: free SMP", plane->name);
mdp5_smp_release(mdp5_kms->smp, pipe);
}
}
plane = &mdp5_plane->base;
mdp5_plane->pipe = pipe;
- mdp5_plane->name = pipe2name(pipe);
mdp5_plane->caps = caps;
mdp5_plane->nformats = mdp_get_formats(mdp5_plane->formats,
type = private_plane ? DRM_PLANE_TYPE_PRIMARY : DRM_PLANE_TYPE_OVERLAY;
ret = drm_universal_plane_init(dev, plane, 0xff, &mdp5_plane_funcs,
mdp5_plane->formats, mdp5_plane->nformats,
- type, "%s", mdp5_plane->name);
+ type, "%s", pipe2name(pipe));
if (ret)
goto fail;