Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 76e9cab5 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge branch 'topic-arcpgu-updates' of...

Merge branch 'topic-arcpgu-updates' of https://github.com/foss-for-synopsys-dwc-arc-processors/linux into drm-next

Please pull this mini-series that allows ARC PGU to use
dedicated memory location as framebuffer backing storage.

* 'topic-arcpgu-updates' of https://github.com/foss-for-synopsys-dwc-arc-processors/linux:
  ARC: [axs10x] Specify reserved memory for frame buffer
  drm/arcpgu: use dedicated memory area for frame buffer
parents cf15fabd cb2ad5e5
Loading
Loading
Loading
Loading
+20 −2
Original line number Original line Diff line number Diff line
@@ -93,8 +93,26 @@
	memory {
	memory {
		#address-cells = <1>;
		#address-cells = <1>;
		#size-cells = <1>;
		#size-cells = <1>;
		ranges = <0x00000000 0x80000000 0x40000000>;
		ranges = <0x00000000 0x80000000 0x20000000>;
		device_type = "memory";
		device_type = "memory";
		reg = <0x80000000 0x20000000>;	/* 512MiB */
		reg = <0x80000000 0x1b000000>;	/* (512 - 32) MiB */
	};

	reserved-memory {
		#address-cells = <1>;
		#size-cells = <1>;
		ranges;
		/*
		 * We just move frame buffer area to the very end of
		 * available DDR. And even though in case of ARC770 there's
		 * no strict requirement for a frame-buffer to be in any
		 * particular location it allows us to use the same
		 * base board's DT node for ARC PGU as for ARc HS38.
		 */
		frame_buffer: frame_buffer@9e000000 {
			compatible = "shared-dma-pool";
			reg = <0x9e000000 0x2000000>;
			no-map;
		};
	};
	};
};
};
+14 −0
Original line number Original line Diff line number Diff line
@@ -100,4 +100,18 @@
		device_type = "memory";
		device_type = "memory";
		reg = <0x80000000 0x20000000>;	/* 512MiB */
		reg = <0x80000000 0x20000000>;	/* 512MiB */
	};
	};

	reserved-memory {
		#address-cells = <1>;
		#size-cells = <1>;
		ranges;
		/*
		 * Move frame buffer out of IOC aperture (0x8z-0xAz).
		 */
		frame_buffer: frame_buffer@be000000 {
			compatible = "shared-dma-pool";
			reg = <0xbe000000 0x2000000>;
			no-map;
		};
	};
};
};
+14 −0
Original line number Original line Diff line number Diff line
@@ -123,4 +123,18 @@
		device_type = "memory";
		device_type = "memory";
		reg = <0x80000000 0x20000000>;	/* 512MiB */
		reg = <0x80000000 0x20000000>;	/* 512MiB */
	};
	};

	reserved-memory {
		#address-cells = <1>;
		#size-cells = <1>;
		ranges;
		/*
		 * Move frame buffer out of IOC aperture (0x8z-0xAz).
		 */
		frame_buffer: frame_buffer@be000000 {
			compatible = "shared-dma-pool";
			reg = <0xbe000000 0x2000000>;
			no-map;
		};
	};
};
};
+1 −1
Original line number Original line Diff line number Diff line
@@ -275,7 +275,7 @@
			encoder-slave = <&adv7511>;
			encoder-slave = <&adv7511>;
			clocks = <&pguclk>;
			clocks = <&pguclk>;
			clock-names = "pxlclk";
			clock-names = "pxlclk";

			memory-region = <&frame_buffer>;
			port {
			port {
				pgu_output: endpoint {
				pgu_output: endpoint {
					remote-endpoint = <&adv7511_input>;
					remote-endpoint = <&adv7511_input>;
+6 −0
Original line number Original line Diff line number Diff line
@@ -19,6 +19,7 @@
#include <drm/drm_fb_cma_helper.h>
#include <drm/drm_fb_cma_helper.h>
#include <drm/drm_gem_cma_helper.h>
#include <drm/drm_gem_cma_helper.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_atomic_helper.h>
#include <linux/of_reserved_mem.h>


#include "arcpgu.h"
#include "arcpgu.h"
#include "arcpgu_regs.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",
	dev_info(drm->dev, "arc_pgu ID: 0x%x\n",
		 arc_pgu_read(arcpgu, ARCPGU_REG_ID));
		 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)))
	if (dma_set_mask_and_coherent(drm->dev, DMA_BIT_MASK(32)))
		return -ENODEV;
		return -ENODEV;