Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753466AbcD0Ofc (ORCPT ); Wed, 27 Apr 2016 10:35:32 -0400 Received: from smtprelay.synopsys.com ([198.182.47.9]:58322 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753087AbcD0Of3 (ORCPT ); Wed, 27 Apr 2016 10:35:29 -0400 From: Alexey Brodkin To: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org, linux-snps-arc@lists.infradead.org, Alexey Brodkin , Dave Airlie , Daniel Vetter Subject: [PATCH 1/2] drm/arcpgu: use dedicated memory area for frame buffer Date: Wed, 27 Apr 2016 17:35:00 +0300 Message-Id: <1461767701-12208-2-git-send-email-abrodkin@synopsys.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1461767701-12208-1-git-send-email-abrodkin@synopsys.com> References: <1461767701-12208-1-git-send-email-abrodkin@synopsys.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1331 Lines: 42 Now when ARC supports reserved memory areas and per-device coherent DMA allocations we may switch ARC PGU to use of those dedicated areas. One of the benefits we may move frame-buffer area out from IO Coherency aperture and so significantly reduce IOC utilization allowing less demanding peripherals to use all perks of IOC. Signed-off-by: Alexey Brodkin Cc: Dave Airlie Cc: Daniel Vetter --- drivers/gpu/drm/arc/arcpgu_drv.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/arc/arcpgu_drv.c b/drivers/gpu/drm/arc/arcpgu_drv.c index 5b35e5db..76e187a 100644 --- a/drivers/gpu/drm/arc/arcpgu_drv.c +++ b/drivers/gpu/drm/arc/arcpgu_drv.c @@ -19,6 +19,7 @@ #include #include #include +#include #include "arcpgu.h" #include "arcpgu_regs.h" @@ -135,6 +136,11 @@ static int arcpgu_load(struct drm_device *drm) dev_info(drm->dev, "arc_pgu ID: 0x%x\n", arc_pgu_read(arcpgu, ARCPGU_REG_ID)); + /* Get the optional framebuffer memory resource */ + ret = of_reserved_mem_device_init(drm->dev); + if (ret && ret != -ENODEV) + return ret; + if (dma_set_mask_and_coherent(drm->dev, DMA_BIT_MASK(32))) return -ENODEV; -- 2.5.5