lkml.org 
[lkml]   [2014]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 06/22] i810: Use pci_zalloc_consistent
On Mon, Jun 23, 2014 at 06:41:34AM -0700, Joe Perches wrote:
> Remove the now unnecessary memset too.
>
> Signed-off-by: Joe Perches <joe@perches.com>

Since I seem to be the last idiot to have touched i810.ko:
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>

> ---
> drivers/gpu/drm/i810/i810_dma.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i810/i810_dma.c b/drivers/gpu/drm/i810/i810_dma.c
> index e88bac1..bae897d 100644
> --- a/drivers/gpu/drm/i810/i810_dma.c
> +++ b/drivers/gpu/drm/i810/i810_dma.c
> @@ -393,15 +393,14 @@ static int i810_dma_initialize(struct drm_device *dev,
>
> /* Program Hardware Status Page */
> dev_priv->hw_status_page =
> - pci_alloc_consistent(dev->pdev, PAGE_SIZE,
> - &dev_priv->dma_status_page);
> + pci_zalloc_consistent(dev->pdev, PAGE_SIZE,
> + &dev_priv->dma_status_page);
> if (!dev_priv->hw_status_page) {
> dev->dev_private = (void *)dev_priv;
> i810_dma_cleanup(dev);
> DRM_ERROR("Can not allocate hardware status page\n");
> return -ENOMEM;
> }
> - memset(dev_priv->hw_status_page, 0, PAGE_SIZE);
> DRM_DEBUG("hw status page @ %p\n", dev_priv->hw_status_page);
>
> I810_WRITE(0x02080, dev_priv->dma_status_page);
> --
> 1.8.1.2.459.gbcd45b4.dirty
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


\
 
 \ /
  Last update: 2014-07-08 13:01    [W:0.436 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site