Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1380485

Re: Allocation of frame buffer at a specific memory range or address

From Vineet Gupta <Vineet.Gupta1@synopsys.com>
Newsgroups linux.kernel
Subject Re: Allocation of frame buffer at a specific memory range or address
Date 2016-04-16 08:10 +0200
Message-ID <rorAC-7v4-1@gated-at.bofh.it> (permalink)
References <roeam-5jh-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Friday 15 April 2016 09:18 PM, Alexey Brodkin wrote:

> 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.

It seems this is pretty easy to do with DT reserved-memory binding.

You need to partition memory into @memory and @reserved-memory.
Later can be subdivided into more granular regions and your driver can refer to
one of the regions.

Something like below (untested)

+	memory {
+		device_type = "memory";
+		reg = <0x0 0x80000000 0x0 0xA0000000>;
+		#address-cells = <2>;
+		#size-cells = <2>;
+	};
+
+	reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+		/* This memory bypasses IOC port */
+		fb_reserved@A0000000 {
+			reg = <0x0 0xA0000000 0x0 0xAF000000>;
+			#address-cells = <2>;
+			#size-cells = <2>;
+			/* no-map;   */
+		};
+	};
+
+
+	fb0: video@12300000 {
+		memory-region = <&fb_reserved>;
+		/* ... */
+	};

This might also need a DT helper in ARC mm init code.

+	early_init_fdt_scan_reserved_mem();

HTH,
-Vineet

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Allocation of frame buffer at a specific memory range or address Alexey Brodkin <Alexey.Brodkin@synopsys.com> - 2016-04-15 17:50 +0200
  Re: Allocation of frame buffer at a specific memory range or address Daniel Vetter <daniel@ffwll.ch> - 2016-04-15 18:50 +0200
  Re: Allocation of frame buffer at a specific memory range or address Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-04-16 08:10 +0200
    Re: Allocation of frame buffer at a specific memory range or address Rob Clark <robdclark@gmail.com> - 2016-04-16 23:50 +0200

csiph-web