diff mbox

drm/i915/slpc: Enable SLPC in guc if supported

Message ID 1471760418-27509-9-git-send-email-sagar.a.kamble@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

sagar.a.kamble@intel.com Aug. 21, 2016, 6:20 a.m. UTC
From: Tom O'Rourke <Tom.O'Rourke@intel.com>

If slpc enabled, then add enable SLPC flag to guc
control parameter during guc load.

v1: Use intel_slpc_enabled() (Paulo)

Reviewed-by: David Weinehall <david.weinehall@linux.intel.com>
Signed-off-by: Tom O'Rourke <Tom.O'Rourke@intel.com>
Signed-off-by: Sagar Arun Kamble <sagar.a.kamble@intel.com>
---
 drivers/gpu/drm/i915/intel_guc_loader.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

kernel test robot Aug. 22, 2016, 5:59 a.m. UTC | #1
Hi Tom,

[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on v4.8-rc3 next-20160819]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on]
[Check https://git-scm.com/docs/git-format-patch for more information]

url:    https://github.com/0day-ci/linux/commits/Sagar-Arun-Kamble/drm-i915-slpc-Enable-SLPC-in-guc-if-supported/20160820-132618
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/gpu/drm/i915/intel_guc_loader.c: In function 'set_guc_init_params':
>> drivers/gpu/drm/i915/intel_guc_loader.c:178:6: error: implicit declaration of function 'intel_slpc_enabled' [-Werror=implicit-function-declaration]
     if (intel_slpc_enabled())
         ^~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/intel_slpc_enabled +178 drivers/gpu/drm/i915/intel_guc_loader.c

   172	
   173		params[GUC_CTL_WA] |= GUC_CTL_WA_UK_BY_DRIVER;
   174	
   175		params[GUC_CTL_FEATURE] |= GUC_CTL_DISABLE_SCHEDULER |
   176				GUC_CTL_VCS2_ENABLED;
   177	
 > 178		if (intel_slpc_enabled())
   179			params[GUC_CTL_FEATURE] |= GUC_CTL_ENABLE_SLPC;
   180	
   181		if (i915.guc_log_level >= 0) {

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
kernel test robot Aug. 22, 2016, 6 a.m. UTC | #2
Hi Tom,

[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on v4.8-rc3 next-20160819]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on]
[Check https://git-scm.com/docs/git-format-patch for more information]

url:    https://github.com/0day-ci/linux/commits/Sagar-Arun-Kamble/drm-i915-slpc-Enable-SLPC-in-guc-if-supported/20160820-132618
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: i386-randconfig-x009-201633 (attached as .config)
compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/linux/firmware.h:4,
                    from drivers/gpu/drm/i915/intel_guc_loader.c:29:
   drivers/gpu/drm/i915/intel_guc_loader.c: In function 'set_guc_init_params':
   drivers/gpu/drm/i915/intel_guc_loader.c:178:6: error: implicit declaration of function 'intel_slpc_enabled' [-Werror=implicit-function-declaration]
     if (intel_slpc_enabled())
         ^
   include/linux/compiler.h:151:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
>> drivers/gpu/drm/i915/intel_guc_loader.c:178:2: note: in expansion of macro 'if'
     if (intel_slpc_enabled())
     ^~
   cc1: some warnings being treated as errors

vim +/if +178 drivers/gpu/drm/i915/intel_guc_loader.c

   162			(get_gttype(dev_priv) << GUC_CTL_GTTYPE_SHIFT) |
   163			(get_core_family(dev_priv) << GUC_CTL_COREFAMILY_SHIFT);
   164	
   165		/*
   166		 * GuC ARAT increment is 10 ns. GuC default scheduler quantum is one
   167		 * second. This ARAR is calculated by:
   168		 * Scheduler-Quantum-in-ns / ARAT-increment-in-ns = 1000000000 / 10
   169		 */
   170		params[GUC_CTL_ARAT_HIGH] = 0;
   171		params[GUC_CTL_ARAT_LOW] = 100000000;
   172	
   173		params[GUC_CTL_WA] |= GUC_CTL_WA_UK_BY_DRIVER;
   174	
   175		params[GUC_CTL_FEATURE] |= GUC_CTL_DISABLE_SCHEDULER |
   176				GUC_CTL_VCS2_ENABLED;
   177	
 > 178		if (intel_slpc_enabled())
   179			params[GUC_CTL_FEATURE] |= GUC_CTL_ENABLE_SLPC;
   180	
   181		if (i915.guc_log_level >= 0) {
   182			params[GUC_CTL_LOG_PARAMS] = guc->log_flags;
   183			params[GUC_CTL_DEBUG] =
   184				i915.guc_log_level << GUC_LOG_VERBOSITY_SHIFT;
   185		}
   186	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_guc_loader.c b/drivers/gpu/drm/i915/intel_guc_loader.c
index 023064d..8d737b4 100644
--- a/drivers/gpu/drm/i915/intel_guc_loader.c
+++ b/drivers/gpu/drm/i915/intel_guc_loader.c
@@ -211,6 +211,9 @@  static void set_guc_init_params(struct drm_i915_private *dev_priv)
 	params[GUC_CTL_FEATURE] |= GUC_CTL_DISABLE_SCHEDULER |
 			GUC_CTL_VCS2_ENABLED;
 
+	if (intel_slpc_enabled())
+		params[GUC_CTL_FEATURE] |= GUC_CTL_ENABLE_SLPC;
+
 	if (i915.guc_log_level >= 0) {
 		params[GUC_CTL_LOG_PARAMS] = guc->log_flags;
 		params[GUC_CTL_DEBUG] =