Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'hdlcd-for-v4.13-v3' of git://linux-arm.org/linux-ld into drm-next

hdlcd fixes.

* tag 'hdlcd-for-v4.13-v3' of git://linux-arm.org/linux-ld:
drm/arm: hdlcd: remove unused variables
drm/arm: hdlcd: Use CMA helper for plane buffer address calculation
drm/arm: hdlcd: Set the CRTC's port before binding the encoder.

+11 -9
+2 -9
drivers/gpu/drm/arm/hdlcd_crtc.c
··· 261 261 { 262 262 struct drm_framebuffer *fb = plane->state->fb; 263 263 struct hdlcd_drm_private *hdlcd; 264 - struct drm_gem_cma_object *gem; 265 - u32 src_x, src_y, dest_h; 264 + u32 dest_h; 266 265 dma_addr_t scanout_start; 267 266 268 267 if (!fb) 269 268 return; 270 269 271 - src_x = plane->state->src.x1 >> 16; 272 - src_y = plane->state->src.y1 >> 16; 273 270 dest_h = drm_rect_height(&plane->state->dst); 274 - gem = drm_fb_cma_get_gem_obj(fb, 0); 275 - 276 - scanout_start = gem->paddr + fb->offsets[0] + 277 - src_y * fb->pitches[0] + 278 - src_x * fb->format->cpp[0]; 271 + scanout_start = drm_fb_cma_get_gem_addr(fb, plane->state, 0); 279 272 280 273 hdlcd = plane->dev->dev_private; 281 274 hdlcd_write(hdlcd, HDLCD_REG_FB_LINE_LENGTH, fb->pitches[0]);
+9
drivers/gpu/drm/arm/hdlcd_drv.c
··· 297 297 if (ret) 298 298 goto err_free; 299 299 300 + /* Set the CRTC's port so that the encoder component can find it */ 301 + hdlcd->crtc.port = of_graph_get_port_by_id(dev->of_node, 0); 302 + 300 303 ret = component_bind_all(dev, drm); 301 304 if (ret) { 302 305 DRM_ERROR("Failed to bind all components\n"); ··· 343 340 } 344 341 err_fbdev: 345 342 drm_kms_helper_poll_fini(drm); 343 + drm_vblank_cleanup(drm); 346 344 err_vblank: 347 345 pm_runtime_disable(drm->dev); 348 346 err_pm_active: 349 347 component_unbind_all(dev, drm); 350 348 err_unload: 349 + of_node_put(hdlcd->crtc.port); 350 + hdlcd->crtc.port = NULL; 351 351 drm_irq_uninstall(drm); 352 352 of_reserved_mem_device_release(drm->dev); 353 353 err_free: ··· 373 367 } 374 368 drm_kms_helper_poll_fini(drm); 375 369 component_unbind_all(dev, drm); 370 + of_node_put(hdlcd->crtc.port); 371 + hdlcd->crtc.port = NULL; 372 + drm_vblank_cleanup(drm); 376 373 pm_runtime_get_sync(drm->dev); 377 374 drm_irq_uninstall(drm); 378 375 pm_runtime_put_sync(drm->dev);