* Re: [Intel-gfx] [RFC 5/5] drm/hdmi21: Add frl_dfm_helper to Makefile
@ 2022-02-05 3:49 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2022-02-05 3:49 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 19051 bytes --]
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20220203055012.14568-6-vandita.kulkarni@intel.com>
References: <20220203055012.14568-6-vandita.kulkarni@intel.com>
TO: Vandita Kulkarni <vandita.kulkarni@intel.com>
Hi Vandita,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on drm/drm-next]
[also build test WARNING on drm-tip/drm-tip next-20220204]
[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/Vandita-Kulkarni/Add-data-flow-metering-support-for-HDMI2-1/20220203-214922
base: git://anongit.freedesktop.org/drm/drm drm-next
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: i386-randconfig-c001 (https://download.01.org/0day-ci/archive/20220205/202202051145.ukwOlIU6-lkp(a)intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project a73e4ce6a59b01f0e37037761c1e6889d539d233)
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
# https://github.com/0day-ci/linux/commit/d6f76f7f3bc7b26c1dd6ebc11ef0cff7deb82058
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Vandita-Kulkarni/Add-data-flow-metering-support-for-HDMI2-1/20220203-214922
git checkout d6f76f7f3bc7b26c1dd6ebc11ef0cff7deb82058
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386 clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
sound/isa/sb/sb16_csp.c:365:9: note: Returning from 'copy_from_user'
if (copy_from_user(&code_h, data_ptr, sizeof(code_h)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/isa/sb/sb16_csp.c:365:9: note: Assuming the condition is false
if (copy_from_user(&code_h, data_ptr, sizeof(code_h)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/isa/sb/sb16_csp.c:365:5: note: Taking false branch
if (copy_from_user(&code_h, data_ptr, sizeof(code_h)))
^
sound/isa/sb/sb16_csp.c:369:9: note: Assuming the condition is true
if (le32_to_cpu(code_h.name) != INIT_HEADER)
^
include/linux/byteorder/generic.h:89:21: note: expanded from macro 'le32_to_cpu'
#define le32_to_cpu __le32_to_cpu
^
include/uapi/linux/byteorder/little_endian.h:35:26: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
^
sound/isa/sb/sb16_csp.c:369:5: note: Taking true branch
if (le32_to_cpu(code_h.name) != INIT_HEADER)
^
sound/isa/sb/sb16_csp.c:370:6: note: Execution continues on line 379
break;
^
sound/isa/sb/sb16_csp.c:379:8: note: Calling 'copy_from_user'
if (copy_from_user(&code_h, data_ptr, sizeof(code_h)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/uaccess.h:191:6: note: Assuming the condition is false
if (likely(check_copy_size(to, n, false)))
^
include/linux/compiler.h:77:38: note: expanded from macro 'likely'
# define likely(x) __builtin_expect(!!(x), 1)
^~~~
include/linux/uaccess.h:191:2: note: Taking true branch
if (likely(check_copy_size(to, n, false)))
^
include/linux/uaccess.h:193:2: note: Returning value (loaded from 'n'), which participates in a condition later
return n;
^~~~~~~~
sound/isa/sb/sb16_csp.c:379:8: note: Returning from 'copy_from_user'
if (copy_from_user(&code_h, data_ptr, sizeof(code_h)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/isa/sb/sb16_csp.c:379:8: note: Assuming the condition is false
if (copy_from_user(&code_h, data_ptr, sizeof(code_h)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/isa/sb/sb16_csp.c:379:4: note: Taking false branch
if (copy_from_user(&code_h, data_ptr, sizeof(code_h)))
^
sound/isa/sb/sb16_csp.c:382:8: note: Assuming the condition is false
if (le32_to_cpu(code_h.name) != MAIN_HEADER) {
^
include/linux/byteorder/generic.h:89:21: note: expanded from macro 'le32_to_cpu'
#define le32_to_cpu __le32_to_cpu
^
include/uapi/linux/byteorder/little_endian.h:35:26: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
^
sound/isa/sb/sb16_csp.c:382:4: note: Taking false branch
if (le32_to_cpu(code_h.name) != MAIN_HEADER) {
^
sound/isa/sb/sb16_csp.c:387:10: note: Calling 'snd_sb_csp_load_user'
err = snd_sb_csp_load_user(p, data_ptr,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/isa/sb/sb16_csp.c:681:6: note: Calling 'IS_ERR'
if (IS_ERR(kbuf))
^~~~~~~~~~~~
include/linux/err.h:36:9: note: Assuming the condition is false
return IS_ERR_VALUE((unsigned long)ptr);
^
include/linux/err.h:22:34: note: expanded from macro 'IS_ERR_VALUE'
#define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO)
~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
include/linux/err.h:36:2: note: Returning zero, which participates in a condition later
return IS_ERR_VALUE((unsigned long)ptr);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/isa/sb/sb16_csp.c:681:6: note: Returning from 'IS_ERR'
if (IS_ERR(kbuf))
^~~~~~~~~~~~
sound/isa/sb/sb16_csp.c:681:2: note: Taking false branch
if (IS_ERR(kbuf))
^
sound/isa/sb/sb16_csp.c:687:2: note: Returning value (loaded from 'err'), which participates in a condition later
return err;
^~~~~~~~~~
sound/isa/sb/sb16_csp.c:387:10: note: Returning from 'snd_sb_csp_load_user'
err = snd_sb_csp_load_user(p, data_ptr,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/isa/sb/sb16_csp.c:389:8: note: Assuming 'err' is 0
if (err)
^~~
sound/isa/sb/sb16_csp.c:389:4: note: Taking false branch
if (err)
^
sound/isa/sb/sb16_csp.c:395:12: note: Assigned value is garbage or undefined
p->mode = le16_to_cpu(funcdesc_h.flags_play_rec);
^
5 warnings generated.
>> drivers/gpu/drm/drm_frl_dfm_helper.c:496:3: warning: Value stored to 'tborrowed_ns' is never read [clang-analyzer-deadcode.DeadStores]
tborrowed_ns = 0;
^ ~
drivers/gpu/drm/drm_frl_dfm_helper.c:496:3: note: Value stored to 'tborrowed_ns' is never read
tborrowed_ns = 0;
^ ~
>> drivers/gpu/drm/drm_frl_dfm_helper.c:760:2: warning: Value stored to 'tblank_ref_ns' is never read [clang-analyzer-deadcode.DeadStores]
tblank_ref_ns = drm_frl_dsc_get_tblank_ref_ns(frl_dfm->params.line_time_ns,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/drm_frl_dfm_helper.c:760:2: note: Value stored to 'tblank_ref_ns' is never read
tblank_ref_ns = drm_frl_dsc_get_tblank_ref_ns(frl_dfm->params.line_time_ns,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/drm_frl_dfm_helper.c:770:2: warning: Value stored to 'tblank_target_ns' is never read [clang-analyzer-deadcode.DeadStores]
tblank_target_ns = frl_dfm->params.line_time_ns - tactive_target_ns;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/drm_frl_dfm_helper.c:770:2: note: Value stored to 'tblank_target_ns' is never read
tblank_target_ns = frl_dfm->params.line_time_ns - tactive_target_ns;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 2 warnings (2 with check filters).
1 warning generated.
sound/firewire/amdtp-stream.c:1683:41: warning: Division by zero [clang-analyzer-core.DivideZero]
sched_irq = !((s->packet_index + 1) %
^
sound/firewire/amdtp-stream.c:1949:6: note: Assuming 'replay_seq' is false
if (replay_seq) {
^~~~~~~~~~
sound/firewire/amdtp-stream.c:1949:2: note: Taking false branch
if (replay_seq) {
^
sound/firewire/amdtp-stream.c:1958:2: note: Loop condition is true. Entering loop body
list_for_each_entry(s, &d->streams, list) {
^
include/linux/list.h:638:2: note: expanded from macro 'list_for_each_entry'
for (pos = list_first_entry(head, typeof(*pos), member); \
^
sound/firewire/amdtp-stream.c:1959:7: note: Assuming field 'direction' is equal to AMDTP_OUT_STREAM
if (s->direction == AMDTP_OUT_STREAM) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/firewire/amdtp-stream.c:1959:3: note: Taking true branch
if (s->direction == AMDTP_OUT_STREAM) {
^
sound/firewire/amdtp-stream.c:1961:4: note: Execution continues on line 1964
break;
^
sound/firewire/amdtp-stream.c:1964:7: note: 'found' is true
if (!found)
^~~~~
sound/firewire/amdtp-stream.c:1964:2: note: Taking false branch
if (!found)
^
sound/firewire/amdtp-stream.c:1973:6: note: Assuming 'events_per_period' is not equal to 0
if (events_per_period == 0)
^~~~~~~~~~~~~~~~~~~~~~
sound/firewire/amdtp-stream.c:1973:2: note: Taking false branch
if (events_per_period == 0)
^
sound/firewire/amdtp-stream.c:1975:6: note: Assuming 'events_per_buffer' is not equal to 0
if (events_per_buffer == 0)
^~~~~~~~~~~~~~~~~~~~~~
sound/firewire/amdtp-stream.c:1975:2: note: Taking false branch
if (events_per_buffer == 0)
^
sound/firewire/amdtp-stream.c:1981:2: note: Loop condition is true. Entering loop body
list_for_each_entry(s, &d->streams, list) {
^
include/linux/list.h:638:2: note: expanded from macro 'list_for_each_entry'
for (pos = list_first_entry(head, typeof(*pos), member); \
^
sound/firewire/amdtp-stream.c:1984:10: note: Field 'direction' is equal to AMDTP_OUT_STREAM
if (s->direction == AMDTP_OUT_STREAM && s == d->irq_target) {
^
sound/firewire/amdtp-stream.c:1984:7: note: Left side of '&&' is true
if (s->direction == AMDTP_OUT_STREAM && s == d->irq_target) {
^
sound/firewire/amdtp-stream.c:1984:43: note: 's' is equal to field 'irq_target'
if (s->direction == AMDTP_OUT_STREAM && s == d->irq_target) {
^
sound/firewire/amdtp-stream.c:1984:3: note: Taking true branch
if (s->direction == AMDTP_OUT_STREAM && s == d->irq_target) {
^
sound/firewire/amdtp-stream.c:1991:7: note: 'err' is >= 0
if (err < 0)
^~~
sound/firewire/amdtp-stream.c:1991:3: note: Taking false branch
if (err < 0)
^
sound/firewire/amdtp-stream.c:1981:2: note: Loop condition is true. Entering loop body
list_for_each_entry(s, &d->streams, list) {
^
include/linux/list.h:638:2: note: expanded from macro 'list_for_each_entry'
for (pos = list_first_entry(head, typeof(*pos), member); \
^
sound/firewire/amdtp-stream.c:1982:3: note: 'idle_irq_interval' initialized to 0
unsigned int idle_irq_interval = 0;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/firewire/amdtp-stream.c:1984:7: note: Assuming field 'direction' is not equal to AMDTP_OUT_STREAM
if (s->direction == AMDTP_OUT_STREAM && s == d->irq_target) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/firewire/amdtp-stream.c:1984:40: note: Left side of '&&' is false
if (s->direction == AMDTP_OUT_STREAM && s == d->irq_target) {
^
sound/firewire/amdtp-stream.c:1990:65: note: Passing the value 0 via 5th parameter 'idle_irq_interval'
err = amdtp_stream_start(s, s->channel, s->speed, queue_size, idle_irq_interval);
^~~~~~~~~~~~~~~~~
sound/firewire/amdtp-stream.c:1990:9: note: Calling 'amdtp_stream_start'
err = amdtp_stream_start(s, s->channel, s->speed, queue_size, idle_irq_interval);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/firewire/amdtp-stream.c:1558:14: note: Calling 'amdtp_stream_running'
if (WARN_ON(amdtp_stream_running(s) ||
^
include/asm-generic/bug.h:121:25: note: expanded from macro 'WARN_ON'
int __ret_warn_on = !!(condition); \
^~~~~~~~~
vim +/tborrowed_ns +496 drivers/gpu/drm/drm_frl_dfm_helper.c
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 467
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 468 /* Verify the configuration meets the capacity requirements for the FRL configuration*/
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 469 static bool
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 470 drm_frl_dfm_verify_frl_capacity_requirement(struct drm_hdmi_frl_dfm *frl_dfm)
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 471 {
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 472 u32 tactive_ref_ns, tblank_ref_ns, tactive_min_ns, tblank_min_ns;
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 473 u32 tborrowed_ns;
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 474
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 475 frl_dfm->params.ftb_avg_k =
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 476 drm_get_avg_tribyte_rate(frl_dfm->params.pixel_clock_max_khz,
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 477 frl_dfm->params.tb_active, frl_dfm->params.tb_blank,
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 478 frl_dfm->config.hactive, frl_dfm->config.hblank);
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 479 tactive_ref_ns = drm_get_tactive_ref(frl_dfm->params.line_time_ns,
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 480 frl_dfm->config.hblank,
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 481 frl_dfm->config.hactive);
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 482 tblank_ref_ns = drm_get_tblank_ref(frl_dfm->params.line_time_ns,
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 483 frl_dfm->config.hblank,
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 484 frl_dfm->config.hactive);
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 485 tactive_min_ns = drm_get_tactive_min(frl_dfm->config.lanes,
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 486 frl_dfm->params.tb_active,
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 487 frl_dfm->params.overhead_max,
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 488 frl_dfm->params.char_rate_min_kbps);
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 489 tblank_min_ns = drm_get_tblank_min(frl_dfm->config.lanes,
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 490 frl_dfm->params.tb_blank,
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 491 frl_dfm->params.overhead_max,
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 492 frl_dfm->params.char_rate_min_kbps);
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 493
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 494 if ((tactive_ref_ns >= tactive_min_ns) &&
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 495 (tblank_ref_ns >= tblank_min_ns)) {
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 @496 tborrowed_ns = 0;
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 497 frl_dfm->params.tb_borrowed = 0;
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 498 return true;
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 499 }
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 500
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 501 if ((tactive_ref_ns < tactive_min_ns) &&
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 502 (tblank_ref_ns >= tblank_min_ns)) {
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 503 tborrowed_ns = tactive_min_ns - tactive_ref_ns;
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 504 frl_dfm->params.tb_borrowed = drm_get_tribytes_borrowed(tborrowed_ns,
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 505 frl_dfm->params.ftb_avg_k);
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 506 if (frl_dfm->params.tb_borrowed <= TB_BORROWED_MAX)
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 507 return true;
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 508 }
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 509
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 510 return false;
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 511 }
77ec1f8e778dfe Vandita Kulkarni 2022-02-03 512
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Intel-gfx] [RFC 5/5] drm/hdmi21: Add frl_dfm_helper to Makefile
2022-02-03 5:50 ` [Intel-gfx] [RFC 5/5] drm/hdmi21: Add frl_dfm_helper to Makefile Vandita Kulkarni
@ 2022-02-03 16:19 ` kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2022-02-03 16:19 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 6690 bytes --]
Hi Vandita,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on drm/drm-next]
[also build test WARNING on drm-intel/for-linux-next drm-tip/drm-tip v5.17-rc2 next-20220203]
[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/Vandita-Kulkarni/Add-data-flow-metering-support-for-HDMI2-1/20220203-214922
base: git://anongit.freedesktop.org/drm/drm drm-next
config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20220204/202202040012.bB3Ih29J-lkp(a)intel.com/config)
compiler: arceb-elf-gcc (GCC) 11.2.0
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
# https://github.com/0day-ci/linux/commit/d6f76f7f3bc7b26c1dd6ebc11ef0cff7deb82058
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Vandita-Kulkarni/Add-data-flow-metering-support-for-HDMI2-1/20220203-214922
git checkout d6f76f7f3bc7b26c1dd6ebc11ef0cff7deb82058
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash drivers/gpu/drm/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/gpu/drm/drm_frl_dfm_helper.c: In function 'drm_frl_dfm_dsc_is_timing_req_met':
>> drivers/gpu/drm/drm_frl_dfm_helper.c:747:63: warning: variable 'tblank_target_ns' set but not used [-Wunused-but-set-variable]
747 | u32 tactive_ref_ns, tblank_ref_ns, tactive_target_ns, tblank_target_ns;
| ^~~~~~~~~~~~~~~~
>> drivers/gpu/drm/drm_frl_dfm_helper.c:747:29: warning: variable 'tblank_ref_ns' set but not used [-Wunused-but-set-variable]
747 | u32 tactive_ref_ns, tblank_ref_ns, tactive_target_ns, tblank_target_ns;
| ^~~~~~~~~~~~~
vim +/tblank_target_ns +747 drivers/gpu/drm/drm_frl_dfm_helper.c
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 741
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 742 /* Is DFM timing requirement is met with DSC */
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 743 static
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 744 bool drm_frl_dfm_dsc_is_timing_req_met(struct drm_hdmi_frl_dfm *frl_dfm)
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 745 {
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 746 u32 ftb_avg_k;
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 @747 u32 tactive_ref_ns, tblank_ref_ns, tactive_target_ns, tblank_target_ns;
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 748 u32 tb_borrowed, tb_delta, tb_worst;
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 749
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 750 ftb_avg_k = drm_frl_dsc_get_ftb_avg(frl_dfm->params.hcactive_target,
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 751 frl_dfm->params.hcblank_target,
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 752 frl_dfm->config.hactive,
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 753 frl_dfm->config.hblank,
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 754 frl_dfm->params.pixel_clock_max_khz);
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 755
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 756 tactive_ref_ns = drm_frl_dsc_get_tactive_ref_ns(frl_dfm->params.line_time_ns,
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 757 frl_dfm->config.hactive,
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 758 frl_dfm->config.hblank);
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 759
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 760 tblank_ref_ns = drm_frl_dsc_get_tblank_ref_ns(frl_dfm->params.line_time_ns,
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 761 frl_dfm->config.hactive,
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 762 frl_dfm->config.hblank);
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 763
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 764 tactive_target_ns = drm_frl_dsc_tactive_target_ns(frl_dfm->config.lanes,
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 765 frl_dfm->params.hcactive_target,
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 766 ftb_avg_k,
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 767 frl_dfm->params.char_rate_min_kbps,
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 768 frl_dfm->params.overhead_max);
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 769
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 770 tblank_target_ns = frl_dfm->params.line_time_ns - tactive_target_ns;
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 771
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 772 tb_borrowed = drm_frl_get_dsc_tri_bytes_borrowed(tactive_target_ns,
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 773 ftb_avg_k,
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 774 frl_dfm->params.hcactive_target);
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 775
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 776 tb_delta = drm_frl_get_dsc_tri_bytes_delta(tactive_target_ns,
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 777 tactive_ref_ns,
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 778 frl_dfm->params.hcactive_target,
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 779 ftb_avg_k,
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 780 frl_dfm->config.hactive,
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 781 frl_dfm->config.hblank,
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 782 frl_dfm->params.line_time_ns);
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 783
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 784 tb_worst = max(tb_borrowed, tb_delta);
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 785 if (tb_worst > TB_BORROWED_MAX)
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 786 return false;
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 787
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 788 frl_dfm->params.ftb_avg_k = ftb_avg_k;
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 789 frl_dfm->params.tb_borrowed = tb_borrowed;
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 790
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 791 return true;
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 792 }
f1aa2e4af1607a Ankit Nautiyal 2022-02-03 793
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Intel-gfx] [RFC 5/5] drm/hdmi21: Add frl_dfm_helper to Makefile
2022-02-03 5:50 [RFC 0/5] Add data flow metering support for HDMI2.1 Vandita Kulkarni
@ 2022-02-03 5:50 ` Vandita Kulkarni
2022-02-03 16:19 ` kernel test robot
0 siblings, 1 reply; 3+ messages in thread
From: Vandita Kulkarni @ 2022-02-03 5:50 UTC (permalink / raw)
To: dri-devel; +Cc: jani.nikula, intel-gfx, laurent.pinchart
Add the new frl_dfm_helper file to drm Makefile
Signed-off-by: Vandita Kulkarni <vandita.kulkarni@intel.com>
---
drivers/gpu/drm/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
index 8675c2af7ae1..4fa9b48995c8 100644
--- a/drivers/gpu/drm/Makefile
+++ b/drivers/gpu/drm/Makefile
@@ -17,7 +17,7 @@ drm-y := drm_aperture.o drm_auth.o drm_cache.o \
drm_dumb_buffers.o drm_mode_config.o drm_vblank.o \
drm_syncobj.o drm_lease.o drm_writeback.o drm_client.o \
drm_client_modeset.o drm_atomic_uapi.o \
- drm_managed.o drm_vblank_work.o
+ drm_managed.o drm_vblank_work.o drm_frl_dfm_helper.o
drm-$(CONFIG_DRM_LEGACY) += drm_agpsupport.o drm_bufs.o drm_context.o drm_dma.o \
drm_hashtab.o drm_irq.o drm_legacy_misc.o drm_lock.o \
--
2.32.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-02-05 3:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-05 3:49 [Intel-gfx] [RFC 5/5] drm/hdmi21: Add frl_dfm_helper to Makefile kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2022-02-03 5:50 [RFC 0/5] Add data flow metering support for HDMI2.1 Vandita Kulkarni
2022-02-03 5:50 ` [Intel-gfx] [RFC 5/5] drm/hdmi21: Add frl_dfm_helper to Makefile Vandita Kulkarni
2022-02-03 16:19 ` 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.