[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <201910042125.hp8VhF2J%lkp@intel.com>
Date: Fri, 4 Oct 2019 22:01:26 +0800
From: kbuild test robot <lkp@...el.com>
To: Bogdan Togorean <bogdan.togorean@...log.com>
Cc: kbuild-all@...org, dri-devel@...ts.freedesktop.org,
airlied@...ux.ie, daniel@...ll.ch, narmstrong@...libre.com,
a.hajda@...sung.com, Laurent.pinchart@...asonboard.com,
jonas@...boo.se, jernej.skrabec@...l.net, allison@...utok.net,
tglx@...utronix.de, rfontana@...hat.com,
linux-kernel@...r.kernel.org,
Bogdan Togorean <bogdan.togorean@...log.com>
Subject: Re: [PATCH 1/2] drm: bridge: adv7511: Enable SPDIF DAI
Hi Bogdan,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[cannot apply to v5.4-rc1 next-20191004]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Bogdan-Togorean/drm-bridge-adv7511-Enable-SPDIF-DAI/20191004-205455
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=xtensa
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
drivers/gpu/drm/bridge/adv7511/adv7511_audio.c: In function 'adv7511_hdmi_hw_params':
>> drivers/gpu/drm/bridge/adv7511/adv7511_audio.c:123:16: warning: this statement may fall through [-Wimplicit-fallthrough=]
audio_source = ADV7511_AUDIO_SOURCE_SPDIF;
drivers/gpu/drm/bridge/adv7511/adv7511_audio.c:124:2: note: here
default:
^~~~~~~
vim +123 drivers/gpu/drm/bridge/adv7511/adv7511_audio.c
55
56 int adv7511_hdmi_hw_params(struct device *dev, void *data,
57 struct hdmi_codec_daifmt *fmt,
58 struct hdmi_codec_params *hparms)
59 {
60 struct adv7511 *adv7511 = dev_get_drvdata(dev);
61 unsigned int audio_source, i2s_format = 0;
62 unsigned int invert_clock;
63 unsigned int rate;
64 unsigned int len;
65
66 switch (hparms->sample_rate) {
67 case 32000:
68 rate = ADV7511_SAMPLE_FREQ_32000;
69 break;
70 case 44100:
71 rate = ADV7511_SAMPLE_FREQ_44100;
72 break;
73 case 48000:
74 rate = ADV7511_SAMPLE_FREQ_48000;
75 break;
76 case 88200:
77 rate = ADV7511_SAMPLE_FREQ_88200;
78 break;
79 case 96000:
80 rate = ADV7511_SAMPLE_FREQ_96000;
81 break;
82 case 176400:
83 rate = ADV7511_SAMPLE_FREQ_176400;
84 break;
85 case 192000:
86 rate = ADV7511_SAMPLE_FREQ_192000;
87 break;
88 default:
89 return -EINVAL;
90 }
91
92 switch (hparms->sample_width) {
93 case 16:
94 len = ADV7511_I2S_SAMPLE_LEN_16;
95 break;
96 case 18:
97 len = ADV7511_I2S_SAMPLE_LEN_18;
98 break;
99 case 20:
100 len = ADV7511_I2S_SAMPLE_LEN_20;
101 break;
102 case 24:
103 len = ADV7511_I2S_SAMPLE_LEN_24;
104 break;
105 default:
106 return -EINVAL;
107 }
108
109 switch (fmt->fmt) {
110 case HDMI_I2S:
111 audio_source = ADV7511_AUDIO_SOURCE_I2S;
112 i2s_format = ADV7511_I2S_FORMAT_I2S;
113 break;
114 case HDMI_RIGHT_J:
115 audio_source = ADV7511_AUDIO_SOURCE_I2S;
116 i2s_format = ADV7511_I2S_FORMAT_RIGHT_J;
117 break;
118 case HDMI_LEFT_J:
119 audio_source = ADV7511_AUDIO_SOURCE_I2S;
120 i2s_format = ADV7511_I2S_FORMAT_LEFT_J;
121 break;
122 case HDMI_SPDIF:
> 123 audio_source = ADV7511_AUDIO_SOURCE_SPDIF;
124 default:
125 return -EINVAL;
126 }
127
128 invert_clock = fmt->bit_clk_inv;
129
130 regmap_update_bits(adv7511->regmap, ADV7511_REG_AUDIO_SOURCE, 0x70,
131 audio_source << 4);
132 regmap_update_bits(adv7511->regmap, ADV7511_REG_AUDIO_CONFIG, BIT(6),
133 invert_clock << 6);
134 regmap_update_bits(adv7511->regmap, ADV7511_REG_I2S_CONFIG, 0x03,
135 i2s_format);
136
137 adv7511->audio_source = audio_source;
138
139 adv7511->f_audio = hparms->sample_rate;
140
141 adv7511_update_cts_n(adv7511);
142
143 regmap_update_bits(adv7511->regmap, ADV7511_REG_AUDIO_CFG3,
144 ADV7511_AUDIO_CFG3_LEN_MASK, len);
145 regmap_update_bits(adv7511->regmap, ADV7511_REG_I2C_FREQ_ID_CFG,
146 ADV7511_I2C_FREQ_ID_CFG_RATE_MASK, rate << 4);
147 regmap_write(adv7511->regmap, 0x73, 0x1);
148
149 return 0;
150 }
151
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Download attachment ".config.gz" of type "application/gzip" (59595 bytes)
Powered by blists - more mailing lists