History

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.

Dave Airlie committed 9 years ago

Commit 338ffbf2 parents 047b8e2 fee49642 files · +11 −9Browse files

Unified · Split

2 files
  1. drivers/gpu/drm/arm/hdlcd_crtc.c +2 −9
  2. drivers/gpu/drm/arm/hdlcd_drv.c +9 −0
drivers/gpu/drm/arm/hdlcd_crtc.c+2−9
@@ -261,21 +261,14 @@ static void hdlcd_plane_atomic_update(struct drm_plane *plane, · 260 unmodified lines
261261 {
262262 struct drm_framebuffer *fb = plane->state->fb;
263263 struct hdlcd_drm_private *hdlcd;
264− struct drm_gem_cma_object *gem;
265− u32 src_x, src_y, dest_h;
264+ u32 dest_h;
266265 dma_addr_t scanout_start;
267266
268267 if (!fb)
269268 return;
270269
271− src_x = plane->state->src.x1 >> 16;
272− src_y = plane->state->src.y1 >> 16;
273270 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);
279272
280273 hdlcd = plane->dev->dev_private;
281274 hdlcd_write(hdlcd, HDLCD_REG_FB_LINE_LENGTH, fb->pitches[0]);
drivers/gpu/drm/arm/hdlcd_drv.c+9−0
@@ -297,6 +297,9 @@ static int hdlcd_drm_bind(struct device *dev) · 296 unmodified lines
297297 if (ret)
298298 goto err_free;
299299
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+
300303 ret = component_bind_all(dev, drm);
301304 if (ret) {
302305 DRM_ERROR("Failed to bind all components\n");
@@ -340,11 +343,14 @@ err_register: · 37 unmodified lines
340343 }
341344 err_fbdev:
342345 drm_kms_helper_poll_fini(drm);
346+ drm_vblank_cleanup(drm);
343347 err_vblank:
344348 pm_runtime_disable(drm->dev);
345349 err_pm_active:
346350 component_unbind_all(dev, drm);
347351 err_unload:
352+ of_node_put(hdlcd->crtc.port);
353+ hdlcd->crtc.port = NULL;
348354 drm_irq_uninstall(drm);
349355 of_reserved_mem_device_release(drm->dev);
350356 err_free:
@@ -367,6 +373,9 @@ static void hdlcd_drm_unbind(struct device *dev) · 16 unmodified lines
367373 }
368374 drm_kms_helper_poll_fini(drm);
369375 component_unbind_all(dev, drm);
376+ of_node_put(hdlcd->crtc.port);
377+ hdlcd->crtc.port = NULL;
378+ drm_vblank_cleanup(drm);
370379 pm_runtime_get_sync(drm->dev);
371380 drm_irq_uninstall(drm);
372381 pm_runtime_put_sync(drm->dev);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t