Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752216AbcDOPtI (ORCPT ); Fri, 15 Apr 2016 11:49:08 -0400 Received: from smtprelay2.synopsys.com ([198.182.60.111]:57204 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751430AbcDOPtF convert rfc822-to-8bit (ORCPT ); Fri, 15 Apr 2016 11:49:05 -0400 From: Alexey Brodkin To: "dri-devel@lists.freedesktop.org" CC: "daniel@ffwll.ch" , "linux-kernel@vger.kernel.org" , "linux-snps-arc@lists.infradead.org" , "airlied@linux.ie" Subject: Allocation of frame buffer at a specific memory range or address Thread-Topic: Allocation of frame buffer at a specific memory range or address Thread-Index: AQHRly5TIfQ9Fo7uRE6wSAQyyWg7lA== Date: Fri, 15 Apr 2016 15:48:59 +0000 Message-ID: <1460735338.3248.21.camel@synopsys.com> Accept-Language: en-US, ru-RU Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.225.15.82] Content-Type: text/plain; charset="utf-7" Content-ID: Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1517 Lines: 36 Hello, I'm wondering if there's a way to force kernel to allocate backing memory for frame buffer in a special location? A little bit of background below. I continue to work on DRM driver for ARC PGU, latest is v5 and available here -+AKA-https://lkml.org/lkml/2016/3/28/170 In current state everything more or less works but I'd like to implement one improvement - I'd like to have an ability to specify where in memory will be allocated frame-buffer's backing storage area. I.e. buffer which will be read by PGU hardware. Currently we use whatever DRM susbsystem put in +ACI-gem-+AD4-paddr+ACI-. That's a snippet of the code which tells PGU hardware which memory location to scan for data: ---------------------+AD4-8-------------------- arcpgu +AD0- crtc+AF8-to+AF8-arcpgu+AF8-priv(plane-+AD4-state-+AD4-crtc)+ADs- gem +AD0- drm+AF8-fb+AF8-cma+AF8-get+AF8-gem+AF8-obj(plane-+AD4-state-+AD4-fb, 0)+ADs- /+ACo- Telling PGU hardware where is data to read +ACo-/ arc+AF8-pgu+AF8-write(arcpgu, ARCPGU+AF8-REG+AF8-BUF0+AF8-ADDR, gem-+AD4-paddr)+ADs- ---------------------+AD4-8-------------------- But we may use a special memory area which works better for that case, i.e. for example could be accessed faster by both CPU and PGU hardware (like on-chip SRAM as opposed to external DDR). And now the question is how to force DRM subsystem or just that driver to use whatever predefined (say via device tree) location in memory for data buffer allocation. All thoughts on this are more than welcome. -Alexey