AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Feifei Xu <Feifei.Xu-5C7GfCeVMHo@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Feifei.Xu-5C7GfCeVMHo@public.gmane.org
Subject: [PATCH 3/8] drm/amdgpu: add amdgpu module parameter for zfb
Date: Thu, 15 Mar 2018 14:11:59 +0800	[thread overview]
Message-ID: <1521094324-23252-3-git-send-email-Feifei.Xu@amd.com> (raw)
In-Reply-To: <1521094324-23252-1-git-send-email-Feifei.Xu-5C7GfCeVMHo@public.gmane.org>

Users can pass in an array to decide enable/disable Zero Frame Buffer.
zfb[0] = zfb_size(MB), zfb[1] = zfb_phys_addr(MB).
If zbf_size > 0, zfb is enabled. Otherwise disabled.
Usage for example:
        modprobe amdgpu zfb=256,8192

Change-Id: I711062eb86b6cdff74572cabb3df250c6708e473
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
Acked-by: John Bridgman <john.bridgman@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu.h     | 1 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 5 +++++
 2 files changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 2e6d986..949b451 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -129,6 +129,7 @@ extern int amdgpu_lbpw;
 extern int amdgpu_compute_multipipe;
 extern int amdgpu_gpu_recovery;
 extern int amdgpu_emu_mode;
+extern ulong amdgpu_zfb[];
 
 #ifdef CONFIG_DRM_AMDGPU_SI
 extern int amdgpu_si_support;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index e670936..53ba4ad 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -132,6 +132,7 @@ int amdgpu_lbpw = -1;
 int amdgpu_compute_multipipe = -1;
 int amdgpu_gpu_recovery = -1; /* auto */
 int amdgpu_emu_mode = 0;
+ulong amdgpu_zfb[2] = {0,4096UL}; /* {0,0x100000000} */
 
 MODULE_PARM_DESC(vramlimit, "Restrict VRAM for testing, in megabytes");
 module_param_named(vramlimit, amdgpu_vram_limit, int, 0600);
@@ -290,6 +291,10 @@ module_param_named(gpu_recovery, amdgpu_gpu_recovery, int, 0444);
 MODULE_PARM_DESC(emu_mode, "Emulation mode, (1 = enable, 0 = disable)");
 module_param_named(emu_mode, amdgpu_emu_mode, int, 0444);
 
+MODULE_PARM_DESC(zfb,
+		 "Enable Zero Frame Buffer feature (zfb will be set like xxxx,xxxx(zfb_size MB,zfb_phys_addr MB),default disabled)");
+module_param_array_named(zfb, amdgpu_zfb, ulong, NULL, 0444);
+
 #ifdef CONFIG_DRM_AMDGPU_SI
 
 #if defined(CONFIG_DRM_RADEON) || defined(CONFIG_DRM_RADEON_MODULE)
-- 
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2018-03-15  6:11 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-15  6:11 [PATCH 1/8] drm/amdgpu: Fix hardcoded base offset of vram pages Feifei Xu
     [not found] ` <1521094324-23252-1-git-send-email-Feifei.Xu-5C7GfCeVMHo@public.gmane.org>
2018-03-15  6:11   ` [PATCH 2/8] drm/amdgpu: add new member in amdgpu_mc for zfb support Feifei Xu
     [not found]     ` <1521094324-23252-2-git-send-email-Feifei.Xu-5C7GfCeVMHo@public.gmane.org>
2018-03-15  8:10       ` Christian König
2018-03-15  6:11   ` Feifei Xu [this message]
     [not found]     ` <1521094324-23252-3-git-send-email-Feifei.Xu-5C7GfCeVMHo@public.gmane.org>
2018-03-15  8:11       ` [PATCH 3/8] drm/amdgpu: add amdgpu module parameter for zfb Christian König
2018-03-15  6:12   ` [PATCH 4/8] drm/amdgpu: init zfb start address and size Feifei Xu
     [not found]     ` <1521094324-23252-4-git-send-email-Feifei.Xu-5C7GfCeVMHo@public.gmane.org>
2018-03-15  8:13       ` Christian König
2018-03-15  6:12   ` [PATCH 5/8] drm/amdgpu: user reserved zfb to init vram base offset " Feifei Xu
     [not found]     ` <1521094324-23252-5-git-send-email-Feifei.Xu-5C7GfCeVMHo@public.gmane.org>
2018-03-15  8:15       ` Christian König
2018-03-15  6:12   ` [PATCH 6/8] drm/amdgpu: enable physical transaction for ptd/pde when ZFB is enabled Feifei Xu
     [not found]     ` <1521094324-23252-6-git-send-email-Feifei.Xu-5C7GfCeVMHo@public.gmane.org>
2018-03-15  8:17       ` Christian König
2018-03-15  6:12   ` [PATCH 7/8] drm/amdgpu: program AGP aperture as frame buffer " Feifei Xu
     [not found]     ` <1521094324-23252-7-git-send-email-Feifei.Xu-5C7GfCeVMHo@public.gmane.org>
2018-03-15  8:18       ` Christian König
2018-03-15  6:12   ` [PATCH 8/8] drm/amdgpu: program system bit for pte/pde " Feifei Xu
     [not found]     ` <1521094324-23252-8-git-send-email-Feifei.Xu-5C7GfCeVMHo@public.gmane.org>
2018-03-15  8:19       ` Christian König
2018-03-15  8:09   ` [PATCH 1/8] drm/amdgpu: Fix hardcoded base offset of vram pages Christian König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1521094324-23252-3-git-send-email-Feifei.Xu@amd.com \
    --to=feifei.xu-5c7gfcevmho@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox