All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] venus: guard load_scale
@ 2020-11-10  6:46 Fritz Koenig
  2020-11-14 20:06   ` kernel test robot
  0 siblings, 1 reply; 3+ messages in thread
From: Fritz Koenig @ 2020-11-10  6:46 UTC (permalink / raw)
  To: linux-media, linux-arm-msm, linux-kernel, stanimir.varbanov,
	vgarodia, dikshita, acourbot, tfiga
  Cc: Fritz Koenig

load_scale can only be safely called after
the encoder has been initialized.

Signed-off-by: Fritz Koenig <frkoenig@chromium.org>
---
 drivers/media/platform/qcom/venus/pm_helpers.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/media/platform/qcom/venus/pm_helpers.h b/drivers/media/platform/qcom/venus/pm_helpers.h
index aa2f6afa23544..32e27db1fa740 100644
--- a/drivers/media/platform/qcom/venus/pm_helpers.h
+++ b/drivers/media/platform/qcom/venus/pm_helpers.h
@@ -35,6 +35,10 @@ static inline int venus_pm_load_scale(struct venus_inst *inst)
 	if (!core->pm_ops || !core->pm_ops->load_scale)
 		return 0;
 
+	if (inst->session_type == VIDC_SESSION_TYPE_ENC &&
+	    inst->enc_state == VENUS_ENC_STATE_INIT)
+		return 0;
+
 	return core->pm_ops->load_scale(inst);
 }
 
-- 
2.29.2.299.gdc1121823c-goog


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] venus: guard load_scale
  2020-11-10  6:46 [PATCH] venus: guard load_scale Fritz Koenig
@ 2020-11-14 20:06   ` kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2020-11-14 20:06 UTC (permalink / raw)
  To: Fritz Koenig, linux-media, linux-arm-msm, linux-kernel,
	stanimir.varbanov, vgarodia, dikshita, acourbot, tfiga
  Cc: kbuild-all, clang-built-linux, Fritz Koenig

[-- Attachment #1: Type: text/plain, Size: 2917 bytes --]

Hi Fritz,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on v5.10-rc3 next-20201113]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Fritz-Koenig/venus-guard-load_scale/20201110-144916
base:   git://linuxtv.org/media_tree.git master
config: arm64-randconfig-r013-20201114 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 9a85643cd357e412cff69067bb5c4840e228c2ab)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://github.com/0day-ci/linux/commit/0f286c3baefce09c2d1845a683814847fed9e45d
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Fritz-Koenig/venus-guard-load_scale/20201110-144916
        git checkout 0f286c3baefce09c2d1845a683814847fed9e45d
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from drivers/media/platform/qcom/venus/core.c:23:
>> drivers/media/platform/qcom/venus/pm_helpers.h:39:12: error: no member named 'enc_state' in 'struct venus_inst'
               inst->enc_state == VENUS_ENC_STATE_INIT)
               ~~~~  ^
>> drivers/media/platform/qcom/venus/pm_helpers.h:39:25: error: use of undeclared identifier 'VENUS_ENC_STATE_INIT'; did you mean 'VENUS_DEC_STATE_INIT'?
               inst->enc_state == VENUS_ENC_STATE_INIT)
                                  ^~~~~~~~~~~~~~~~~~~~
                                  VENUS_DEC_STATE_INIT
   drivers/media/platform/qcom/venus/core.h:270:2: note: 'VENUS_DEC_STATE_INIT' declared here
           VENUS_DEC_STATE_INIT            = 1,
           ^
   2 errors generated.

vim +39 drivers/media/platform/qcom/venus/pm_helpers.h

    30	
    31	static inline int venus_pm_load_scale(struct venus_inst *inst)
    32	{
    33		struct venus_core *core = inst->core;
    34	
    35		if (!core->pm_ops || !core->pm_ops->load_scale)
    36			return 0;
    37	
    38		if (inst->session_type == VIDC_SESSION_TYPE_ENC &&
  > 39		    inst->enc_state == VENUS_ENC_STATE_INIT)
    40			return 0;
    41	
    42		return core->pm_ops->load_scale(inst);
    43	}
    44	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 38611 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] venus: guard load_scale
@ 2020-11-14 20:06   ` kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2020-11-14 20:06 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2984 bytes --]

Hi Fritz,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on v5.10-rc3 next-20201113]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Fritz-Koenig/venus-guard-load_scale/20201110-144916
base:   git://linuxtv.org/media_tree.git master
config: arm64-randconfig-r013-20201114 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 9a85643cd357e412cff69067bb5c4840e228c2ab)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://github.com/0day-ci/linux/commit/0f286c3baefce09c2d1845a683814847fed9e45d
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Fritz-Koenig/venus-guard-load_scale/20201110-144916
        git checkout 0f286c3baefce09c2d1845a683814847fed9e45d
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from drivers/media/platform/qcom/venus/core.c:23:
>> drivers/media/platform/qcom/venus/pm_helpers.h:39:12: error: no member named 'enc_state' in 'struct venus_inst'
               inst->enc_state == VENUS_ENC_STATE_INIT)
               ~~~~  ^
>> drivers/media/platform/qcom/venus/pm_helpers.h:39:25: error: use of undeclared identifier 'VENUS_ENC_STATE_INIT'; did you mean 'VENUS_DEC_STATE_INIT'?
               inst->enc_state == VENUS_ENC_STATE_INIT)
                                  ^~~~~~~~~~~~~~~~~~~~
                                  VENUS_DEC_STATE_INIT
   drivers/media/platform/qcom/venus/core.h:270:2: note: 'VENUS_DEC_STATE_INIT' declared here
           VENUS_DEC_STATE_INIT            = 1,
           ^
   2 errors generated.

vim +39 drivers/media/platform/qcom/venus/pm_helpers.h

    30	
    31	static inline int venus_pm_load_scale(struct venus_inst *inst)
    32	{
    33		struct venus_core *core = inst->core;
    34	
    35		if (!core->pm_ops || !core->pm_ops->load_scale)
    36			return 0;
    37	
    38		if (inst->session_type == VIDC_SESSION_TYPE_ENC &&
  > 39		    inst->enc_state == VENUS_ENC_STATE_INIT)
    40			return 0;
    41	
    42		return core->pm_ops->load_scale(inst);
    43	}
    44	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 38611 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-14 20:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-10  6:46 [PATCH] venus: guard load_scale Fritz Koenig
2020-11-14 20:06 ` kernel test robot
2020-11-14 20:06   ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.