Re: [Intel-gfx] [RFC 11/13] drm/i915: Read DSC capabilities of the HDMI2.1 PCON encoder
by kernel test robot
Hi Ankit,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on drm-tip/drm-tip]
[cannot apply to drm-intel/for-linux-next drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next linus/master drm/drm-next v5.9 next-20201015]
[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/Ankit-Nautiyal/Add-support-for-D...
base: git://anongit.freedesktop.org/drm/drm-tip drm-tip
config: x86_64-randconfig-a006-20201014 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project e7b4feea8e1bf520b34ad8c116abab6677344b74)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/7e4e2d9558b0439382a9b2a477d7ab9d2...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ankit-Nautiyal/Add-support-for-DP-HDMI2-1-PCON/20201015-190247
git checkout 7e4e2d9558b0439382a9b2a477d7ab9d25e09394
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/gpu/drm/i915/display/intel_dp.c:4015:13: warning: converting the result of '<<' to a boolean always evaluates to true [-Wtautological-constant-compare]
if (buf && DP_PCON_DSC_BLOCK_PRED_SUPPORT)
^
include/drm/drm_dp_helper.h:490:50: note: expanded from macro 'DP_PCON_DSC_BLOCK_PRED_SUPPORT'
# define DP_PCON_DSC_BLOCK_PRED_SUPPORT (0x1 << 0)
^
>> drivers/gpu/drm/i915/display/intel_dp.c:3885:6: warning: no previous prototype for function 'intel_dp_get_pcon_dsc_cap' [-Wmissing-prototypes]
void intel_dp_get_pcon_dsc_cap(struct intel_dp *intel_dp)
^
drivers/gpu/drm/i915/display/intel_dp.c:3885:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void intel_dp_get_pcon_dsc_cap(struct intel_dp *intel_dp)
^
static
2 warnings generated.
vim +4015 drivers/gpu/drm/i915/display/intel_dp.c
3884
> 3885 void intel_dp_get_pcon_dsc_cap(struct intel_dp *intel_dp)
3886 {
3887 u8 buf;
3888 u8 rc_buf_blk_size;
3889 u8 max_slices = 0;
3890
3891 struct drm_i915_private *i915 = dp_to_i915(intel_dp);
3892 struct intel_dp_pcon_dsc *pcon_dsc = &intel_dp->pcon_dsc;
3893
3894 if (drm_dp_dpcd_readb(&intel_dp->aux, DP_PCON_DSC_ENCODER, &buf) < 0) {
3895 drm_err(&i915->drm, "Failed to read DP_PCON_DSC_ENCODER\n");
3896 return;
3897 }
3898 pcon_dsc->enc_support = buf & DP_PCON_DSC_ENCODER_SUPPORTED;
3899 pcon_dsc->pps_override_support = buf & DP_PCON_DSC_PPS_ENC_OVERRIDE;
3900
3901 if (drm_dp_dpcd_readb(&intel_dp->aux, DP_PCON_DSC_VERSION, &buf) < 0) {
3902 drm_err(&i915->drm, "Failed to read DP_PCON_DSC_VERSION\n");
3903 return;
3904 }
3905 pcon_dsc->version_major = (buf & DP_PCON_DSC_MAJOR_MASK) >>
3906 DP_PCON_DSC_MAJOR_SHIFT;
3907 pcon_dsc->version_minor = (buf & DP_PCON_DSC_MINOR_MASK) >>
3908 DP_PCON_DSC_MINOR_SHIFT;
3909
3910 if (drm_dp_dpcd_readb(&intel_dp->aux, DP_PCON_DSC_RC_BUF_BLK_INFO, &buf) < 0) {
3911 drm_err(&i915->drm, "Failed to read DP_PCON_DSC_RC_BUF_BLK_INFO\n");
3912 return;
3913 }
3914
3915 switch (buf & DP_PCON_DSC_RC_BUF_BLK_SIZE) {
3916 case DP_PCON_DSC_RC_BUF_BLK_1KB :
3917 rc_buf_blk_size = 1;
3918 break;
3919 case DP_PCON_DSC_RC_BUF_BLK_4KB :
3920 rc_buf_blk_size = 4;
3921 break;
3922 case DP_PCON_DSC_RC_BUF_BLK_16KB :
3923 rc_buf_blk_size = 16;
3924 break;
3925 case DP_PCON_DSC_RC_BUF_BLK_64KB :
3926 rc_buf_blk_size = 64;
3927 break;
3928 default :
3929 rc_buf_blk_size = 0;
3930 }
3931
3932 if (drm_dp_dpcd_readb(&intel_dp->aux, DP_PCON_DSC_RC_BUF_SIZE, &buf) < 0) {
3933 drm_err(&i915->drm, "Failed to read DP_PCON_DSC_RC_BUF_SIZE\n");
3934 return;
3935 }
3936 /* storing rc_buf_size in bytes */
3937 pcon_dsc->rc_buf_size = (buf + 1) * rc_buf_blk_size * 1024;
3938
3939 if (drm_dp_dpcd_readb(&intel_dp->aux, DP_PCON_DSC_SLICE_CAP_2, &buf) < 0) {
3940 drm_err(&i915->drm, "Failed to read DP_PCON_DSC_SLICE_CAP_2\n");
3941 return;
3942 }
3943 if (buf & DP_PCON_DSC_24_PER_DSC_ENC)
3944 max_slices = 24;
3945 else if (buf & DP_PCON_DSC_20_PER_DSC_ENC)
3946 max_slices = 20;
3947 else if (buf & DP_PCON_DSC_16_PER_DSC_ENC)
3948 max_slices = 16;
3949
3950 if (max_slices == 0) {
3951 if (drm_dp_dpcd_readb(&intel_dp->aux, DP_PCON_DSC_SLICE_CAP_1,
3952 &buf) < 0) {
3953 drm_err(&i915->drm, "Failed to read DP_PCON_DSC_SLICE_CAP_2\n");
3954 return;
3955 }
3956
3957 if (buf & DP_PCON_DSC_12_PER_DSC_ENC)
3958 max_slices = 12;
3959 else if (buf & DP_PCON_DSC_10_PER_DSC_ENC)
3960 max_slices = 10;
3961 else if (buf & DP_PCON_DSC_8_PER_DSC_ENC)
3962 max_slices = 8;
3963 else if (buf & DP_PCON_DSC_6_PER_DSC_ENC)
3964 max_slices = 6;
3965 else if (buf & DP_PCON_DSC_4_PER_DSC_ENC)
3966 max_slices = 4;
3967 else if (buf & DP_PCON_DSC_2_PER_DSC_ENC)
3968 max_slices = 2;
3969 else if (buf & DP_PCON_DSC_1_PER_DSC_ENC)
3970 max_slices = 1;
3971 }
3972
3973 pcon_dsc->max_slices = max_slices;
3974
3975 if (drm_dp_dpcd_readb(&intel_dp->aux, DP_PCON_DSC_BUF_BIT_DEPTH, &buf) < 0) {
3976 drm_err(&i915->drm, "Failed to read DP_PCON_DSC_BUF_BIT_DEPTH\n");
3977 return;
3978 }
3979 switch (buf & DP_PCON_DSC_BIT_DEPTH_MASK) {
3980 case DP_PCON_DSC_DEPTH_8_BITS :
3981 pcon_dsc->line_buf_bit_depth = 8;
3982 break;
3983 case DP_PCON_DSC_DEPTH_9_BITS :
3984 pcon_dsc->line_buf_bit_depth = 9;
3985 break;
3986 case DP_PCON_DSC_DEPTH_10_BITS :
3987 pcon_dsc->line_buf_bit_depth = 10;
3988 break;
3989 case DP_PCON_DSC_DEPTH_11_BITS :
3990 pcon_dsc->line_buf_bit_depth = 11;
3991 break;
3992 case DP_PCON_DSC_DEPTH_12_BITS :
3993 pcon_dsc->line_buf_bit_depth = 12;
3994 break;
3995 case DP_PCON_DSC_DEPTH_13_BITS :
3996 pcon_dsc->line_buf_bit_depth = 13;
3997 break;
3998 case DP_PCON_DSC_DEPTH_14_BITS :
3999 pcon_dsc->line_buf_bit_depth = 14;
4000 break;
4001 case DP_PCON_DSC_DEPTH_15_BITS :
4002 pcon_dsc->line_buf_bit_depth = 15;
4003 break;
4004 case DP_PCON_DSC_DEPTH_16_BITS :
4005 pcon_dsc->line_buf_bit_depth = 16;
4006 break;
4007 default :
4008 pcon_dsc->line_buf_bit_depth = 0;
4009 }
4010
4011 if (drm_dp_dpcd_readb(&intel_dp->aux, DP_PCON_DSC_BLOCK_PREDICTION, &buf) < 0) {
4012 drm_err(&i915->drm, "Failed to read DP_PCON_DSC_BLOCK_PREDICTION\n");
4013 return;
4014 }
> 4015 if (buf && DP_PCON_DSC_BLOCK_PRED_SUPPORT)
4016 pcon_dsc->blk_prediction_support = true;
4017
4018 if (drm_dp_dpcd_readb(&intel_dp->aux, DP_PCON_DSC_ENC_COLOR_FMT_CAP, &buf) < 0) {
4019 drm_err(&i915->drm, "Failed to read DP_PCON_DSC_ENC_COLOR_FMT_CAP\n");
4020 return;
4021 }
4022 pcon_dsc->color_fmt_mask = buf;
4023
4024 if (drm_dp_dpcd_readb(&intel_dp->aux, DP_PCON_DSC_ENC_COLOR_DEPTH_CAP, &buf) < 0) {
4025 drm_err(&i915->drm, "Failed to read DP_PCON_DSC_ENC_COLOR_DEPTH_CAP\n");
4026 return;
4027 }
4028 pcon_dsc->color_depth_mask = buf;
4029
4030 if (drm_dp_dpcd_readb(&intel_dp->aux, DP_PCON_DSC_MAX_SLICE_WIDTH, &buf) < 0) {
4031 drm_err(&i915->drm, "Failed to read DP_PCON_DSC_MAX_SLICE_WIDTH\n");
4032 return;
4033 }
4034 pcon_dsc->max_slice_width = buf;;
4035
4036 if (drm_dp_dpcd_readb(&intel_dp->aux, DP_PCON_DSC_BPP_INCR, &buf) < 0) {
4037 drm_err(&i915->drm, "Failed to read DP_PCON_DSC_BPP_INCR\n");
4038 return;
4039 }
4040 switch(buf & DP_PCON_DSC_BPP_INCR_MASK) {
4041 case DP_PCON_DSC_ONE_16TH_BPP:
4042 pcon_dsc->bpp_precision_incr = 16;
4043 break;
4044 case DP_PCON_DSC_ONE_8TH_BPP:
4045 pcon_dsc->bpp_precision_incr = 8;
4046 break;
4047 case DP_PCON_DSC_ONE_4TH_BPP:
4048 pcon_dsc->bpp_precision_incr = 4;
4049 break;
4050 case DP_PCON_DSC_ONE_HALF_BPP:
4051 pcon_dsc->bpp_precision_incr = 2;
4052 break;
4053 case DP_PCON_DSC_ONE_BPP:
4054 pcon_dsc->bpp_precision_incr = 1;
4055 break;
4056 default :
4057 pcon_dsc->bpp_precision_incr = 0;
4058 }
4059 }
4060
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
[jpirko-mlxsw:jiri_devel_xmrouter 4/39] include/trace/events/mlxsw.h:132:12: warning: format '%p' expects argument of type 'void but argument 4 has type 'unsigned int'
by kernel test robot
tree: https://github.com/jpirko/linux_mlxsw jiri_devel_xmrouter
head: c75336805f0f0dfce5225ce8235d4dcabe959a5e
commit: 800a354746446c848fd735bcf47e43a702e4f2eb [4/39] mlxsw: spectrum_router: Introduce FIB event queue instead of separate works
config: mips-allyesconfig (attached as .config)
compiler: mips-linux-gcc (GCC) 9.3.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/jpirko/linux_mlxsw/commit/800a354746446c848fd735bcf47e...
git remote add jpirko-mlxsw https://github.com/jpirko/linux_mlxsw
git fetch --no-tags jpirko-mlxsw jiri_devel_xmrouter
git checkout 800a354746446c848fd735bcf47e43a702e4f2eb
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/trace/define_trace.h:102,
from include/trace/events/mlxsw.h:140,
from drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_atcam.c:11:
include/trace/events/mlxsw.h: In function 'trace_raw_output_mlxsw_sp_router_fib_event_work_end':
>> include/trace/events/mlxsw.h:132:12: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'unsigned int' [-Wformat=]
132 | TP_printk("mlxsw_sp %p, fib_events_count %p",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/trace/trace_events.h:367:22: note: in definition of macro 'DECLARE_EVENT_CLASS'
367 | trace_seq_printf(s, print); \
| ^~~~~
include/trace/trace_events.h:80:9: note: in expansion of macro 'PARAMS'
80 | PARAMS(print)); \
| ^~~~~~
include/trace/events/mlxsw.h:116:1: note: in expansion of macro 'TRACE_EVENT'
116 | TRACE_EVENT(mlxsw_sp_router_fib_event_work_end,
| ^~~~~~~~~~~
include/trace/events/mlxsw.h:132:2: note: in expansion of macro 'TP_printk'
132 | TP_printk("mlxsw_sp %p, fib_events_count %p",
| ^~~~~~~~~
In file included from include/trace/trace_events.h:401,
from include/trace/define_trace.h:102,
from include/trace/events/mlxsw.h:140,
from drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_atcam.c:11:
include/trace/events/mlxsw.h:132:44: note: format string is defined here
132 | TP_printk("mlxsw_sp %p, fib_events_count %p",
| ~^
| |
| void *
| %d
vim +132 include/trace/events/mlxsw.h
115
116 TRACE_EVENT(mlxsw_sp_router_fib_event_work_end,
117 TP_PROTO(const struct mlxsw_sp *mlxsw_sp,
118 unsigned int fib_events_count),
119
120 TP_ARGS(mlxsw_sp, fib_events_count),
121
122 TP_STRUCT__entry(
123 __field(const void *, mlxsw_sp)
124 __field(unsigned int, fib_events_count)
125 ),
126
127 TP_fast_assign(
128 __entry->mlxsw_sp = mlxsw_sp;
129 __entry->fib_events_count = fib_events_count;
130 ),
131
> 132 TP_printk("mlxsw_sp %p, fib_events_count %p",
133 __entry->mlxsw_sp, __entry->fib_events_count)
134 );
135
136
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
Re: [Intel-gfx] [RFC 11/13] drm/i915: Read DSC capabilities of the HDMI2.1 PCON encoder
by kernel test robot
Hi Ankit,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on drm-tip/drm-tip]
[cannot apply to drm-intel/for-linux-next drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next linus/master drm/drm-next v5.9 next-20201015]
[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/Ankit-Nautiyal/Add-support-for-D...
base: git://anongit.freedesktop.org/drm/drm-tip drm-tip
config: i386-randconfig-a004-20201014 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/7e4e2d9558b0439382a9b2a477d7ab9d2...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ankit-Nautiyal/Add-support-for-DP-HDMI2-1-PCON/20201015-190247
git checkout 7e4e2d9558b0439382a9b2a477d7ab9d25e09394
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/gpu/drm/i915/display/intel_dp.c:3885:6: warning: no previous prototype for 'intel_dp_get_pcon_dsc_cap' [-Wmissing-prototypes]
3885 | void intel_dp_get_pcon_dsc_cap(struct intel_dp *intel_dp)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
vim +/intel_dp_get_pcon_dsc_cap +3885 drivers/gpu/drm/i915/display/intel_dp.c
3884
> 3885 void intel_dp_get_pcon_dsc_cap(struct intel_dp *intel_dp)
3886 {
3887 u8 buf;
3888 u8 rc_buf_blk_size;
3889 u8 max_slices = 0;
3890
3891 struct drm_i915_private *i915 = dp_to_i915(intel_dp);
3892 struct intel_dp_pcon_dsc *pcon_dsc = &intel_dp->pcon_dsc;
3893
3894 if (drm_dp_dpcd_readb(&intel_dp->aux, DP_PCON_DSC_ENCODER, &buf) < 0) {
3895 drm_err(&i915->drm, "Failed to read DP_PCON_DSC_ENCODER\n");
3896 return;
3897 }
3898 pcon_dsc->enc_support = buf & DP_PCON_DSC_ENCODER_SUPPORTED;
3899 pcon_dsc->pps_override_support = buf & DP_PCON_DSC_PPS_ENC_OVERRIDE;
3900
3901 if (drm_dp_dpcd_readb(&intel_dp->aux, DP_PCON_DSC_VERSION, &buf) < 0) {
3902 drm_err(&i915->drm, "Failed to read DP_PCON_DSC_VERSION\n");
3903 return;
3904 }
3905 pcon_dsc->version_major = (buf & DP_PCON_DSC_MAJOR_MASK) >>
3906 DP_PCON_DSC_MAJOR_SHIFT;
3907 pcon_dsc->version_minor = (buf & DP_PCON_DSC_MINOR_MASK) >>
3908 DP_PCON_DSC_MINOR_SHIFT;
3909
3910 if (drm_dp_dpcd_readb(&intel_dp->aux, DP_PCON_DSC_RC_BUF_BLK_INFO, &buf) < 0) {
3911 drm_err(&i915->drm, "Failed to read DP_PCON_DSC_RC_BUF_BLK_INFO\n");
3912 return;
3913 }
3914
3915 switch (buf & DP_PCON_DSC_RC_BUF_BLK_SIZE) {
3916 case DP_PCON_DSC_RC_BUF_BLK_1KB :
3917 rc_buf_blk_size = 1;
3918 break;
3919 case DP_PCON_DSC_RC_BUF_BLK_4KB :
3920 rc_buf_blk_size = 4;
3921 break;
3922 case DP_PCON_DSC_RC_BUF_BLK_16KB :
3923 rc_buf_blk_size = 16;
3924 break;
3925 case DP_PCON_DSC_RC_BUF_BLK_64KB :
3926 rc_buf_blk_size = 64;
3927 break;
3928 default :
3929 rc_buf_blk_size = 0;
3930 }
3931
3932 if (drm_dp_dpcd_readb(&intel_dp->aux, DP_PCON_DSC_RC_BUF_SIZE, &buf) < 0) {
3933 drm_err(&i915->drm, "Failed to read DP_PCON_DSC_RC_BUF_SIZE\n");
3934 return;
3935 }
3936 /* storing rc_buf_size in bytes */
3937 pcon_dsc->rc_buf_size = (buf + 1) * rc_buf_blk_size * 1024;
3938
3939 if (drm_dp_dpcd_readb(&intel_dp->aux, DP_PCON_DSC_SLICE_CAP_2, &buf) < 0) {
3940 drm_err(&i915->drm, "Failed to read DP_PCON_DSC_SLICE_CAP_2\n");
3941 return;
3942 }
3943 if (buf & DP_PCON_DSC_24_PER_DSC_ENC)
3944 max_slices = 24;
3945 else if (buf & DP_PCON_DSC_20_PER_DSC_ENC)
3946 max_slices = 20;
3947 else if (buf & DP_PCON_DSC_16_PER_DSC_ENC)
3948 max_slices = 16;
3949
3950 if (max_slices == 0) {
3951 if (drm_dp_dpcd_readb(&intel_dp->aux, DP_PCON_DSC_SLICE_CAP_1,
3952 &buf) < 0) {
3953 drm_err(&i915->drm, "Failed to read DP_PCON_DSC_SLICE_CAP_2\n");
3954 return;
3955 }
3956
3957 if (buf & DP_PCON_DSC_12_PER_DSC_ENC)
3958 max_slices = 12;
3959 else if (buf & DP_PCON_DSC_10_PER_DSC_ENC)
3960 max_slices = 10;
3961 else if (buf & DP_PCON_DSC_8_PER_DSC_ENC)
3962 max_slices = 8;
3963 else if (buf & DP_PCON_DSC_6_PER_DSC_ENC)
3964 max_slices = 6;
3965 else if (buf & DP_PCON_DSC_4_PER_DSC_ENC)
3966 max_slices = 4;
3967 else if (buf & DP_PCON_DSC_2_PER_DSC_ENC)
3968 max_slices = 2;
3969 else if (buf & DP_PCON_DSC_1_PER_DSC_ENC)
3970 max_slices = 1;
3971 }
3972
3973 pcon_dsc->max_slices = max_slices;
3974
3975 if (drm_dp_dpcd_readb(&intel_dp->aux, DP_PCON_DSC_BUF_BIT_DEPTH, &buf) < 0) {
3976 drm_err(&i915->drm, "Failed to read DP_PCON_DSC_BUF_BIT_DEPTH\n");
3977 return;
3978 }
3979 switch (buf & DP_PCON_DSC_BIT_DEPTH_MASK) {
3980 case DP_PCON_DSC_DEPTH_8_BITS :
3981 pcon_dsc->line_buf_bit_depth = 8;
3982 break;
3983 case DP_PCON_DSC_DEPTH_9_BITS :
3984 pcon_dsc->line_buf_bit_depth = 9;
3985 break;
3986 case DP_PCON_DSC_DEPTH_10_BITS :
3987 pcon_dsc->line_buf_bit_depth = 10;
3988 break;
3989 case DP_PCON_DSC_DEPTH_11_BITS :
3990 pcon_dsc->line_buf_bit_depth = 11;
3991 break;
3992 case DP_PCON_DSC_DEPTH_12_BITS :
3993 pcon_dsc->line_buf_bit_depth = 12;
3994 break;
3995 case DP_PCON_DSC_DEPTH_13_BITS :
3996 pcon_dsc->line_buf_bit_depth = 13;
3997 break;
3998 case DP_PCON_DSC_DEPTH_14_BITS :
3999 pcon_dsc->line_buf_bit_depth = 14;
4000 break;
4001 case DP_PCON_DSC_DEPTH_15_BITS :
4002 pcon_dsc->line_buf_bit_depth = 15;
4003 break;
4004 case DP_PCON_DSC_DEPTH_16_BITS :
4005 pcon_dsc->line_buf_bit_depth = 16;
4006 break;
4007 default :
4008 pcon_dsc->line_buf_bit_depth = 0;
4009 }
4010
4011 if (drm_dp_dpcd_readb(&intel_dp->aux, DP_PCON_DSC_BLOCK_PREDICTION, &buf) < 0) {
4012 drm_err(&i915->drm, "Failed to read DP_PCON_DSC_BLOCK_PREDICTION\n");
4013 return;
4014 }
4015 if (buf && DP_PCON_DSC_BLOCK_PRED_SUPPORT)
4016 pcon_dsc->blk_prediction_support = true;
4017
4018 if (drm_dp_dpcd_readb(&intel_dp->aux, DP_PCON_DSC_ENC_COLOR_FMT_CAP, &buf) < 0) {
4019 drm_err(&i915->drm, "Failed to read DP_PCON_DSC_ENC_COLOR_FMT_CAP\n");
4020 return;
4021 }
4022 pcon_dsc->color_fmt_mask = buf;
4023
4024 if (drm_dp_dpcd_readb(&intel_dp->aux, DP_PCON_DSC_ENC_COLOR_DEPTH_CAP, &buf) < 0) {
4025 drm_err(&i915->drm, "Failed to read DP_PCON_DSC_ENC_COLOR_DEPTH_CAP\n");
4026 return;
4027 }
4028 pcon_dsc->color_depth_mask = buf;
4029
4030 if (drm_dp_dpcd_readb(&intel_dp->aux, DP_PCON_DSC_MAX_SLICE_WIDTH, &buf) < 0) {
4031 drm_err(&i915->drm, "Failed to read DP_PCON_DSC_MAX_SLICE_WIDTH\n");
4032 return;
4033 }
4034 pcon_dsc->max_slice_width = buf;;
4035
4036 if (drm_dp_dpcd_readb(&intel_dp->aux, DP_PCON_DSC_BPP_INCR, &buf) < 0) {
4037 drm_err(&i915->drm, "Failed to read DP_PCON_DSC_BPP_INCR\n");
4038 return;
4039 }
4040 switch(buf & DP_PCON_DSC_BPP_INCR_MASK) {
4041 case DP_PCON_DSC_ONE_16TH_BPP:
4042 pcon_dsc->bpp_precision_incr = 16;
4043 break;
4044 case DP_PCON_DSC_ONE_8TH_BPP:
4045 pcon_dsc->bpp_precision_incr = 8;
4046 break;
4047 case DP_PCON_DSC_ONE_4TH_BPP:
4048 pcon_dsc->bpp_precision_incr = 4;
4049 break;
4050 case DP_PCON_DSC_ONE_HALF_BPP:
4051 pcon_dsc->bpp_precision_incr = 2;
4052 break;
4053 case DP_PCON_DSC_ONE_BPP:
4054 pcon_dsc->bpp_precision_incr = 1;
4055 break;
4056 default :
4057 pcon_dsc->bpp_precision_incr = 0;
4058 }
4059 }
4060
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
[RFC PATCH] drm/i915: intel_dp_get_pcon_dsc_cap() can be static
by kernel test robot
Signed-off-by: kernel test robot <lkp(a)intel.com>
---
intel_dp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index b4f8abaea60772..410b3932d7ae24 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -3882,7 +3882,7 @@ cpt_set_link_train(struct intel_dp *intel_dp,
intel_de_posting_read(dev_priv, intel_dp->output_reg);
}
-void intel_dp_get_pcon_dsc_cap(struct intel_dp *intel_dp)
+static void intel_dp_get_pcon_dsc_cap(struct intel_dp *intel_dp)
{
u8 buf;
u8 rc_buf_blk_size;
1 year, 11 months
Re: [PATCH v3 06/17] scsi_transport_fc: Added store fucntionality to set the rport port_state using sysfs
by kernel test robot
Hi Muneendra,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on scsi/for-next]
[also build test WARNING on mkp-scsi/for-next next-20201015]
[cannot apply to v5.9]
[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/Muneendra/scsi-Support-to-handle...
base: https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.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/6bb032ada0c283207bbbf0d17a5d8091f...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Muneendra/scsi-Support-to-handle-Intermittent-errors/20201015-182315
git checkout 6bb032ada0c283207bbbf0d17a5d8091f49ebb03
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/module.h:12,
from drivers/scsi/scsi_transport_fc.c:11:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
drivers/scsi/scsi_transport_fc.c: In function 'fc_rport_set_marginal_state':
>> drivers/scsi/scsi_transport_fc.c:982:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
982 | int ret = 0;
| ^~~
vim +/ret +982 drivers/scsi/scsi_transport_fc.c
969
970 /*
971 * Sets port_state to Marginal/Online.
972 * On Marginal it Sets no retries on abort in scmd->state for all
973 * outstanding io of all the scsi_devs
974 * This only allows ONLINE->MARGINAL and MARGINAL->ONLINE
975 */
976 static ssize_t fc_rport_set_marginal_state(struct device *dev,
977 struct device_attribute *attr,
978 const char *buf, size_t count)
979 {
980 struct fc_rport *rport = transport_class_to_rport(dev);
981 enum fc_port_state port_state;
> 982 int ret = 0;
983
984 ret = get_fc_port_state_match(buf, &port_state);
985
986 if (port_state == FC_PORTSTATE_MARGINAL) {
987 /*
988 * Change the state to marginal only if the
989 * current rport state is Online
990 * Allow only Online->marginal
991 */
992 if (rport->port_state == FC_PORTSTATE_ONLINE) {
993 rport->port_state = port_state;
994 scsi_target_chg_noretries_abort(&rport->dev, 1);
995 }
996 } else if (port_state == FC_PORTSTATE_ONLINE) {
997 /*
998 * Change the state to Online only if the
999 * current rport state is Marginal
1000 * Allow only MArginal->Online
1001 */
1002 if (rport->port_state == FC_PORTSTATE_MARGINAL) {
1003 rport->port_state = port_state;
1004 scsi_target_chg_noretries_abort(&rport->dev, 0);
1005 }
1006 } else
1007 return -EINVAL;
1008 return count;
1009 }
1010
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
Re: [RFC PATCH v2 1/3] tracing: Show real address for trace event arguments
by kernel test robot
Hi Masami,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on tip/perf/core]
[also build test WARNING on trace/for-next linus/master linux/master v5.9 next-20201015]
[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/Masami-Hiramatsu/tracing-Show-re...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git f91072ed1b7283b13ca57fcfbece5a3b92726143
config: mips-randconfig-r032-20201014 (attached as .config)
compiler: mips-linux-gcc (GCC) 9.3.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/a6a1d5c58f41dfe757e25790b0183ea0a...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Masami-Hiramatsu/tracing-Show-real-address-instead-of-hashed-pointer/20201015-170221
git checkout a6a1d5c58f41dfe757e25790b0183ea0a0ff7754
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
kernel/trace/trace_output.c: In function 'trace_event_printf':
>> kernel/trace/trace_output.c:320:2: warning: function 'trace_event_printf' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
320 | trace_seq_vprintf(&iter->seq, trace_event_format(iter, fmt), ap);
| ^~~~~~~~~~~~~~~~~
kernel/trace/trace_output.c: In function 'trace_output_raw':
kernel/trace/trace_output.c:331:2: warning: function 'trace_output_raw' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
331 | trace_seq_vprintf(s, trace_event_format(iter, fmt), ap);
| ^~~~~~~~~~~~~~~~~
vim +320 kernel/trace/trace_output.c
314
315 void trace_event_printf(struct trace_iterator *iter, const char *fmt, ...)
316 {
317 va_list ap;
318
319 va_start(ap, fmt);
> 320 trace_seq_vprintf(&iter->seq, trace_event_format(iter, fmt), ap);
321 va_end(ap);
322 }
323 EXPORT_SYMBOL(trace_event_printf);
324
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
[pm:acpica-osl 6/6] drivers/acpi/osl.c:1748:46: sparse: sparse: incorrect type in assignment (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git acpica-osl
head: c32c3c4079f8a62616413abbead45b6622fb7602
commit: c32c3c4079f8a62616413abbead45b6622fb7602 [6/6] ACPI: OSL: Make ACPICA use logical addresses of GPE blocks
config: x86_64-randconfig-s022-20200904 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-191-g10164920-dirty
git checkout c32c3c4079f8a62616413abbead45b6622fb7602
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
drivers/acpi/osl.c:376:17: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/acpi/osl.c:1748:46: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *extern [addressable] [toplevel] acpi_gbl_xgpe0_block_logical_address @@ got void [noderef] __iomem * @@
>> drivers/acpi/osl.c:1748:46: sparse: expected void *extern [addressable] [toplevel] acpi_gbl_xgpe0_block_logical_address
drivers/acpi/osl.c:1748:46: sparse: got void [noderef] __iomem *
>> drivers/acpi/osl.c:1750:46: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *extern [addressable] [toplevel] acpi_gbl_xgpe1_block_logical_address @@ got void [noderef] __iomem * @@
>> drivers/acpi/osl.c:1750:46: sparse: expected void *extern [addressable] [toplevel] acpi_gbl_xgpe1_block_logical_address
drivers/acpi/osl.c:1750:46: sparse: got void [noderef] __iomem *
drivers/acpi/osl.c:1760:20: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *rv @@ got void [noderef] __iomem * @@
drivers/acpi/osl.c:1760:20: sparse: expected void *rv
drivers/acpi/osl.c:1760:20: sparse: got void [noderef] __iomem *
drivers/acpi/osl.c:708:1: sparse: sparse: context imbalance in 'acpi_os_read_memory' - wrong count at exit
drivers/acpi/osl.c:741:1: sparse: sparse: context imbalance in 'acpi_os_write_memory' - wrong count at exit
# https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/commi...
git remote add pm https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
git fetch --no-tags pm acpica-osl
git checkout c32c3c4079f8a62616413abbead45b6622fb7602
vim +1748 drivers/acpi/osl.c
1742
1743 acpi_status __init acpi_os_initialize(void)
1744 {
1745 acpi_os_map_generic_address(&acpi_gbl_FADT.xpm1a_event_block);
1746 acpi_os_map_generic_address(&acpi_gbl_FADT.xpm1b_event_block);
1747
> 1748 acpi_gbl_xgpe0_block_logical_address =
1749 acpi_os_map_generic_address(&acpi_gbl_FADT.xgpe0_block);
> 1750 acpi_gbl_xgpe1_block_logical_address =
1751 acpi_os_map_generic_address(&acpi_gbl_FADT.xgpe1_block);
1752
1753 if (acpi_gbl_FADT.flags & ACPI_FADT_RESET_REGISTER) {
1754 /*
1755 * Use acpi_os_map_generic_address to pre-map the reset
1756 * register if it's in system memory.
1757 */
1758 void *rv;
1759
1760 rv = acpi_os_map_generic_address(&acpi_gbl_FADT.reset_register);
1761 pr_debug(PREFIX "%s: map reset_reg %s\n", __func__,
1762 rv ? "successful" : "failed");
1763 }
1764 acpi_os_initialized = true;
1765
1766 return AE_OK;
1767 }
1768
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
Re: [PATCH v5] usb-serial:cp210x: add support to software flow control
by kernel test robot
Hi Sheng,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on usb-serial/usb-next]
[also build test WARNING on v5.9 next-20201015]
[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/Sheng-Long-Wang/usb-serial-cp210...
base: https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial.git usb-next
config: x86_64-randconfig-a004-20201014 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project e7b4feea8e1bf520b34ad8c116abab6677344b74)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/87886eacf097dd70bd9f9391eb329fa40...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Sheng-Long-Wang/usb-serial-cp210x-add-support-to-software-flow-control/20201015-150459
git checkout 87886eacf097dd70bd9f9391eb329fa40706038a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/usb/serial/cp210x.c:1553:6: warning: variable 'result' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (((iflag & IXOFF) != (old_iflag & IXOFF)) ||
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/usb/serial/cp210x.c:1592:6: note: uninitialized use occurs here
if (result < 0)
^~~~~~
drivers/usb/serial/cp210x.c:1553:2: note: remove the 'if' if its condition is always true
if (((iflag & IXOFF) != (old_iflag & IXOFF)) ||
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/usb/serial/cp210x.c:1436:12: note: initialize the variable 'result' to silence this warning
int result;
^
= 0
1 warning generated.
vim +1553 drivers/usb/serial/cp210x.c
1427
1428 static void cp210x_set_termios(struct tty_struct *tty,
1429 struct usb_serial_port *port, struct ktermios *old_termios)
1430 {
1431 struct device *dev = &port->dev;
1432 unsigned int cflag, old_cflag, iflag, old_iflag;
1433 struct cp210x_special_chars special_chars;
1434 struct cp210x_flow_ctl flow_ctl;
1435 u16 bits;
1436 int result;
1437 u32 ctl_hs;
1438 u32 flow_repl;
1439
1440 cflag = tty->termios.c_cflag;
1441 iflag = tty->termios.c_iflag;
1442 old_cflag = old_termios->c_cflag;
1443 old_iflag = old_termios->c_iflag;
1444
1445 if (tty->termios.c_ospeed != old_termios->c_ospeed)
1446 cp210x_change_speed(tty, port, old_termios);
1447
1448 /* If the number of data bits is to be updated */
1449 if ((cflag & CSIZE) != (old_cflag & CSIZE)) {
1450 cp210x_get_line_ctl(port, &bits);
1451 bits &= ~BITS_DATA_MASK;
1452 switch (cflag & CSIZE) {
1453 case CS5:
1454 bits |= BITS_DATA_5;
1455 dev_dbg(dev, "%s - data bits = 5\n", __func__);
1456 break;
1457 case CS6:
1458 bits |= BITS_DATA_6;
1459 dev_dbg(dev, "%s - data bits = 6\n", __func__);
1460 break;
1461 case CS7:
1462 bits |= BITS_DATA_7;
1463 dev_dbg(dev, "%s - data bits = 7\n", __func__);
1464 break;
1465 case CS8:
1466 default:
1467 bits |= BITS_DATA_8;
1468 dev_dbg(dev, "%s - data bits = 8\n", __func__);
1469 break;
1470 }
1471 if (cp210x_write_u16_reg(port, CP210X_SET_LINE_CTL, bits))
1472 dev_dbg(dev, "Number of data bits requested not supported by device\n");
1473 }
1474
1475 if ((cflag & (PARENB|PARODD|CMSPAR)) !=
1476 (old_cflag & (PARENB|PARODD|CMSPAR))) {
1477 cp210x_get_line_ctl(port, &bits);
1478 bits &= ~BITS_PARITY_MASK;
1479 if (cflag & PARENB) {
1480 if (cflag & CMSPAR) {
1481 if (cflag & PARODD) {
1482 bits |= BITS_PARITY_MARK;
1483 dev_dbg(dev, "%s - parity = MARK\n", __func__);
1484 } else {
1485 bits |= BITS_PARITY_SPACE;
1486 dev_dbg(dev, "%s - parity = SPACE\n", __func__);
1487 }
1488 } else {
1489 if (cflag & PARODD) {
1490 bits |= BITS_PARITY_ODD;
1491 dev_dbg(dev, "%s - parity = ODD\n", __func__);
1492 } else {
1493 bits |= BITS_PARITY_EVEN;
1494 dev_dbg(dev, "%s - parity = EVEN\n", __func__);
1495 }
1496 }
1497 }
1498 if (cp210x_write_u16_reg(port, CP210X_SET_LINE_CTL, bits))
1499 dev_dbg(dev, "Parity mode not supported by device\n");
1500 }
1501
1502 if ((cflag & CSTOPB) != (old_cflag & CSTOPB)) {
1503 cp210x_get_line_ctl(port, &bits);
1504 bits &= ~BITS_STOP_MASK;
1505 if (cflag & CSTOPB) {
1506 bits |= BITS_STOP_2;
1507 dev_dbg(dev, "%s - stop bits = 2\n", __func__);
1508 } else {
1509 bits |= BITS_STOP_1;
1510 dev_dbg(dev, "%s - stop bits = 1\n", __func__);
1511 }
1512 if (cp210x_write_u16_reg(port, CP210X_SET_LINE_CTL, bits))
1513 dev_dbg(dev, "Number of stop bits requested not supported by device\n");
1514 }
1515
1516 if ((cflag & CRTSCTS) != (old_cflag & CRTSCTS)) {
1517 cp210x_read_reg_block(port, CP210X_GET_FLOW, &flow_ctl,
1518 sizeof(flow_ctl));
1519 ctl_hs = le32_to_cpu(flow_ctl.ulControlHandshake);
1520 flow_repl = le32_to_cpu(flow_ctl.ulFlowReplace);
1521 dev_dbg(dev, "%s - read ulControlHandshake=0x%08x, ulFlowReplace=0x%08x\n",
1522 __func__, ctl_hs, flow_repl);
1523
1524 ctl_hs &= ~CP210X_SERIAL_DSR_HANDSHAKE;
1525 ctl_hs &= ~CP210X_SERIAL_DCD_HANDSHAKE;
1526 ctl_hs &= ~CP210X_SERIAL_DSR_SENSITIVITY;
1527 ctl_hs &= ~CP210X_SERIAL_DTR_MASK;
1528 ctl_hs |= CP210X_SERIAL_DTR_SHIFT(CP210X_SERIAL_DTR_ACTIVE);
1529 if (cflag & CRTSCTS) {
1530 ctl_hs |= CP210X_SERIAL_CTS_HANDSHAKE;
1531
1532 flow_repl &= ~CP210X_SERIAL_RTS_MASK;
1533 flow_repl |= CP210X_SERIAL_RTS_SHIFT(
1534 CP210X_SERIAL_RTS_FLOW_CTL);
1535 dev_dbg(dev, "%s - flow control = CRTSCTS\n", __func__);
1536 } else {
1537 ctl_hs &= ~CP210X_SERIAL_CTS_HANDSHAKE;
1538
1539 flow_repl &= ~CP210X_SERIAL_RTS_MASK;
1540 flow_repl |= CP210X_SERIAL_RTS_SHIFT(
1541 CP210X_SERIAL_RTS_ACTIVE);
1542 dev_dbg(dev, "%s - flow control = NONE\n", __func__);
1543 }
1544
1545 dev_dbg(dev, "%s - write ulControlHandshake=0x%08x, ulFlowReplace=0x%08x\n",
1546 __func__, ctl_hs, flow_repl);
1547 flow_ctl.ulControlHandshake = cpu_to_le32(ctl_hs);
1548 flow_ctl.ulFlowReplace = cpu_to_le32(flow_repl);
1549 cp210x_write_reg_block(port, CP210X_SET_FLOW, &flow_ctl,
1550 sizeof(flow_ctl));
1551 }
1552
> 1553 if (((iflag & IXOFF) != (old_iflag & IXOFF)) ||
1554 ((iflag & IXON) != (old_iflag & IXON))) {
1555 result = cp210x_get_chars(port, &special_chars);
1556 if (result < 0)
1557 goto out;
1558
1559 special_chars.bXonChar = START_CHAR(tty);
1560 special_chars.bXoffChar = STOP_CHAR(tty);
1561
1562 result = cp210x_set_chars(port, &special_chars);
1563 if (result < 0)
1564 goto out;
1565
1566 result = cp210x_read_reg_block(port,
1567 CP210X_GET_FLOW,
1568 &flow_ctl,
1569 sizeof(flow_ctl));
1570 if (result < 0)
1571 goto out;
1572
1573 flow_repl = le32_to_cpu(flow_ctl.ulFlowReplace);
1574
1575 if (iflag & IXOFF)
1576 flow_repl |= CP210X_SERIAL_AUTO_RECEIVE;
1577 else
1578 flow_repl &= ~CP210X_SERIAL_AUTO_RECEIVE;
1579
1580 if (iflag & IXON)
1581 flow_repl |= CP210X_SERIAL_AUTO_TRANSMIT;
1582 else
1583 flow_repl &= ~CP210X_SERIAL_AUTO_TRANSMIT;
1584
1585 flow_ctl.ulFlowReplace = cpu_to_le32(flow_repl);
1586 result = cp210x_write_reg_block(port,
1587 CP210X_SET_FLOW,
1588 &flow_ctl,
1589 sizeof(flow_ctl));
1590 }
1591 out:
1592 if (result < 0)
1593 dev_err(dev, "failed to set software flow control: %d\n", result);
1594
1595 /*
1596 * Enable event-insertion mode only if input parity checking is
1597 * enabled for now.
1598 */
1599 if (I_INPCK(tty))
1600 cp210x_enable_event_mode(port);
1601 else
1602 cp210x_disable_event_mode(port);
1603 }
1604
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months