Re: [PATCH v10 8/9] dt-bindings: add documentation of xilinx clocking wizard

2021-04-08 Thread Shubhrajyoti Datta
On Sun, Mar 7, 2021 at 1:50 AM Rob Herring  wrote:
>
> On Wed, Feb 24, 2021 at 06:40:40PM +0530, Shubhrajyoti Datta wrote:
> > Add the devicetree binding for the xilinx clocking wizard.
> >
> > Signed-off-by: Shubhrajyoti Datta 
> > ---
> >  v6:
> >  Fix a yaml warning
> >  v7:
> >  Add vendor prefix speed-grade
> >  v8:
> >  Fix the warnings
> >  v10:
> >  Add nr-outputs
> >
> >  .../bindings/clock/xlnx,clocking-wizard.yaml   | 72 
> > ++
> >  1 file changed, 72 insertions(+)
> >  create mode 100644 
> > Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml
> >
> > diff --git 
> > a/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml 
> > b/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml
> > new file mode 100644
> > index 000..280eb09
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml
> > @@ -0,0 +1,72 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: "http://devicetree.org/schemas/clock/xlnx,clocking-wizard.yaml#";
> > +$schema: "http://devicetree.org/meta-schemas/core.yaml#";
> > +
> > +title: Xilinx clocking wizard
> > +
> > +maintainers:
> > +  - Shubhrajyoti Datta 
> > +
> > +description:
> > +  The clocking wizard is a soft ip clocking block of Xilinx versal. It
> > +  reads required input clock frequencies from the devicetree and acts as 
> > clock
> > +  clock output.
> > +
> > +properties:
> > +  compatible:
> > +const: xlnx,clocking-wizard
>
> Not very specific. Only 1 version of this h/w?

Will fix in next version
>
> > +
> > +  reg:
> > +maxItems: 1
> > +
> > +  "#clock-cells":
> > +const: 1
> > +
> > +  clocks:
> > +items:
> > +  - description: clock input
> > +  - description: axi clock
> > +
> > +  clock-names:
> > +items:
> > +  - const: clk_in1
> > +  - const: s_axi_aclk
> > +
> > +
> > +  xlnx,speed-grade:
> > +$ref: /schemas/types.yaml#/definitions/uint32
> > +enum: [1, 2, 3]
> > +description:
> > +  Speed grade of the device. Higher the speed grade faster is the FPGA 
> > device.
>
> How does one decide what value?
This is a property of the FPGA fabric.
So  hdf/xsa  should tell that
>
> > +
> > +  nr-outputs:
>
> xlnx,nr-outputs
>
> > +$ref: /schemas/types.yaml#/definitions/uint32
> > +enum: [1, 2, 3, 4, 5, 6, 7, 8]
>
> minimum: 1
> maximum: 8
>
> > +description:
> > +  Number of outputs.
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +  - "#clock-cells"
> > +  - clocks
> > +  - clock-names
> > +  - xlnx,speed-grade
> > +  - nr-outputs
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  - |
> > +wizard@b000  {
>
> clock-controller@...
will fix.
>
> > +compatible = "xlnx,clocking-wizard";
> > +reg = <0xb000 0x1>;
> > +#clock-cells = <1>;
> > +xlnx,speed-grade = <1>;
> > +nr-outputs = <6>;
> > +clock-names = "clk_in1", "s_axi_aclk";
> > +clocks = <&clkc 15>, <&clkc 15>;
> > +};
> > +...
> > --
> > 2.1.1
> >
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v10 8/9] dt-bindings: add documentation of xilinx clocking wizard

2021-04-08 Thread Michal Simek



On 4/8/21 12:26 PM, Shubhrajyoti Datta wrote:
> On Sun, Mar 7, 2021 at 1:50 AM Rob Herring  wrote:
>>
>> On Wed, Feb 24, 2021 at 06:40:40PM +0530, Shubhrajyoti Datta wrote:
>>> Add the devicetree binding for the xilinx clocking wizard.
>>>
>>> Signed-off-by: Shubhrajyoti Datta 
>>> ---
>>>  v6:
>>>  Fix a yaml warning
>>>  v7:
>>>  Add vendor prefix speed-grade
>>>  v8:
>>>  Fix the warnings
>>>  v10:
>>>  Add nr-outputs
>>>
>>>  .../bindings/clock/xlnx,clocking-wizard.yaml   | 72 
>>> ++
>>>  1 file changed, 72 insertions(+)
>>>  create mode 100644 
>>> Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml
>>>
>>> diff --git 
>>> a/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml 
>>> b/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml
>>> new file mode 100644
>>> index 000..280eb09
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml
>>> @@ -0,0 +1,72 @@
>>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>>> +%YAML 1.2
>>> +---
>>> +$id: "http://devicetree.org/schemas/clock/xlnx,clocking-wizard.yaml#";
>>> +$schema: "http://devicetree.org/meta-schemas/core.yaml#";
>>> +
>>> +title: Xilinx clocking wizard
>>> +
>>> +maintainers:
>>> +  - Shubhrajyoti Datta 
>>> +
>>> +description:
>>> +  The clocking wizard is a soft ip clocking block of Xilinx versal. It
>>> +  reads required input clock frequencies from the devicetree and acts as 
>>> clock
>>> +  clock output.
>>> +
>>> +properties:
>>> +  compatible:
>>> +const: xlnx,clocking-wizard
>>
>> Not very specific. Only 1 version of this h/w?
> 
> Will fix in next version
>>
>>> +
>>> +  reg:
>>> +maxItems: 1
>>> +
>>> +  "#clock-cells":
>>> +const: 1
>>> +
>>> +  clocks:
>>> +items:
>>> +  - description: clock input
>>> +  - description: axi clock
>>> +
>>> +  clock-names:
>>> +items:
>>> +  - const: clk_in1
>>> +  - const: s_axi_aclk
>>> +
>>> +
>>> +  xlnx,speed-grade:
>>> +$ref: /schemas/types.yaml#/definitions/uint32
>>> +enum: [1, 2, 3]
>>> +description:
>>> +  Speed grade of the device. Higher the speed grade faster is the FPGA 
>>> device.
>>
>> How does one decide what value?
> This is a property of the FPGA fabric.
> So  hdf/xsa  should tell that

Shubhrajyoti: Rob likely doesn't know what hdf/xsa is that's why it is
better to avoid it.

fpgas/pl part of SoC are tested for performance and different chips have
different speed grades. This is done for every chip and some chips are
faster/slower. Based on this speed grade is labeled. And there is no way
how to find at run time which speed grade your device has. That's why
there is a need to have property to identify this.

In designed tools it is your responsibility to select proper chip based
on your order and then this value is propagated in Xilinx standard way
via device tree generator to fill the right value for this property.

Thanks,
Michal
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[driver-core:tty-test 13/13] drivers/tty/tty_baudrate.c:92:9: warning: no previous prototype for function 'tty_termios_input_baud_rate'

2021-04-08 Thread kernel test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git 
tty-test
head:   8a67b4c2f3f14e73a8ddfbef9c032d9f2fa6979a
commit: 8a67b4c2f3f14e73a8ddfbef9c032d9f2fa6979a [13/13] tty: clean 
include/linux/tty.h up
config: x86_64-randconfig-r013-20210408 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 
56ea2e2fdd691136d5e6631fa0e447173694b82c)
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://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git/commit/?id=8a67b4c2f3f14e73a8ddfbef9c032d9f2fa6979a
git remote add driver-core 
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git
git fetch --no-tags driver-core tty-test
git checkout 8a67b4c2f3f14e73a8ddfbef9c032d9f2fa6979a
# 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 

All warnings (new ones prefixed by >>):

>> drivers/tty/tty_baudrate.c:92:9: warning: no previous prototype for function 
>> 'tty_termios_input_baud_rate' [-Wmissing-prototypes]
   speed_t tty_termios_input_baud_rate(struct ktermios *termios)
   ^
   drivers/tty/tty_baudrate.c:92:1: note: declare 'static' if the function is 
not intended to be used outside of this translation unit
   speed_t tty_termios_input_baud_rate(struct ktermios *termios)
   ^
   static 
   1 warning generated.


vim +/tty_termios_input_baud_rate +92 drivers/tty/tty_baudrate.c

fff0a2ca3a061c Nicolas Pitre  2017-04-12   79  
fff0a2ca3a061c Nicolas Pitre  2017-04-12   80  /**
fff0a2ca3a061c Nicolas Pitre  2017-04-12   81   *   
tty_termios_input_baud_rate
fff0a2ca3a061c Nicolas Pitre  2017-04-12   82   *   @termios: termios 
structure
fff0a2ca3a061c Nicolas Pitre  2017-04-12   83   *
fff0a2ca3a061c Nicolas Pitre  2017-04-12   84   *   Convert termios baud 
rate data into a speed. This should be called
fff0a2ca3a061c Nicolas Pitre  2017-04-12   85   *   with the termios lock 
held if this termios is a terminal termios
fff0a2ca3a061c Nicolas Pitre  2017-04-12   86   *   structure. May change 
the termios data. Device drivers can call this
fff0a2ca3a061c Nicolas Pitre  2017-04-12   87   *   function but should use 
->c_[io]speed directly as they are updated.
fff0a2ca3a061c Nicolas Pitre  2017-04-12   88   *
fff0a2ca3a061c Nicolas Pitre  2017-04-12   89   *   Locking: none
fff0a2ca3a061c Nicolas Pitre  2017-04-12   90   */
fff0a2ca3a061c Nicolas Pitre  2017-04-12   91  
fff0a2ca3a061c Nicolas Pitre  2017-04-12  @92  speed_t 
tty_termios_input_baud_rate(struct ktermios *termios)
fff0a2ca3a061c Nicolas Pitre  2017-04-12   93  {
fff0a2ca3a061c Nicolas Pitre  2017-04-12   94  #ifdef IBSHIFT
fff0a2ca3a061c Nicolas Pitre  2017-04-12   95   unsigned int cbaud = 
(termios->c_cflag >> IBSHIFT) & CBAUD;
fff0a2ca3a061c Nicolas Pitre  2017-04-12   96  
fff0a2ca3a061c Nicolas Pitre  2017-04-12   97   if (cbaud == B0)
fff0a2ca3a061c Nicolas Pitre  2017-04-12   98   return 
tty_termios_baud_rate(termios);
fefe287e4bf6ee Johan Hovold   2018-07-15   99  #ifdef BOTHER
fff0a2ca3a061c Nicolas Pitre  2017-04-12  100   /* Magic token for arbitrary 
speed via c_ispeed*/
fff0a2ca3a061c Nicolas Pitre  2017-04-12  101   if (cbaud == BOTHER)
fff0a2ca3a061c Nicolas Pitre  2017-04-12  102   return 
termios->c_ispeed;
fefe287e4bf6ee Johan Hovold   2018-07-15  103  #endif
fff0a2ca3a061c Nicolas Pitre  2017-04-12  104   if (cbaud & CBAUDEX) {
fff0a2ca3a061c Nicolas Pitre  2017-04-12  105   cbaud &= ~CBAUDEX;
fff0a2ca3a061c Nicolas Pitre  2017-04-12  106  
fff0a2ca3a061c Nicolas Pitre  2017-04-12  107   if (cbaud < 1 || cbaud 
+ 15 > n_baud_table)
fff0a2ca3a061c Nicolas Pitre  2017-04-12  108   
termios->c_cflag &= ~(CBAUDEX << IBSHIFT);
fff0a2ca3a061c Nicolas Pitre  2017-04-12  109   else
fff0a2ca3a061c Nicolas Pitre  2017-04-12  110   cbaud += 15;
fff0a2ca3a061c Nicolas Pitre  2017-04-12  111   }
991a2519409700 H. Peter Anvin 2018-10-22  112   return cbaud >= n_baud_table ? 
0 : baud_table[cbaud];
fefe287e4bf6ee Johan Hovold   2018-07-15  113  #else/* IBSHIFT */
fff0a2ca3a061c Nicolas Pitre  2017-04-12  114   return 
tty_termios_baud_rate(termios);
fefe287e4bf6ee Johan Hovold   2018-07-15  115  #endif   /* IBSHIFT */
fff0a2ca3a061c Nicolas Pitre  2017-04-12  116  }
fff0a2ca3a061c Nicolas Pitre  2017-04-12  117  
EXPORT_SYMBOL(tty_termios_input_baud_rate);
fff0a2ca3a061c Nico

[staging:staging-testing] BUILD SUCCESS 4e35b91390fcd13bf46e12acd3b6f94a082a6cf3

2021-04-08 Thread kernel test robot
warp_defconfig
arm  pxa3xx_defconfig
um   x86_64_defconfig
powerpc   allnoconfig
mips   ip28_defconfig
sh   sh7724_generic_defconfig
sh  rsk7269_defconfig
mipsbcm47xx_defconfig
powerpcmpc7448_hpc2_defconfig
arm  footbridge_defconfig
mips   ip22_defconfig
arm hackkit_defconfig
nios2alldefconfig
powerpc mpc5200_defconfig
powerpc  ep88xc_defconfig
m68k  amiga_defconfig
arm  colibri_pxa270_defconfig
powerpcmvme5100_defconfig
mipsmaltaup_xpa_defconfig
armtrizeps4_defconfig
armxcep_defconfig
ia64zx1_defconfig
sh  sh7785lcr_32bit_defconfig
um   allmodconfig
powerpc  pasemi_defconfig
powerpc   mpc834x_itxgp_defconfig
arm  ep93xx_defconfig
arcvdk_hs38_smp_defconfig
mips   ip32_defconfig
arc nsimosci_hs_defconfig
arm shannon_defconfig
powerpc mpc8272_ads_defconfig
openriscdefconfig
riscv nommu_k210_sdcard_defconfig
mips  ath25_defconfig
mips  ath79_defconfig
ia64 allmodconfig
ia64defconfig
ia64 allyesconfig
m68k allmodconfig
m68kdefconfig
nios2   defconfig
arc  allyesconfig
nds32 allnoconfig
nds32   defconfig
nios2allyesconfig
cskydefconfig
alpha   defconfig
alphaallyesconfig
xtensa   allyesconfig
h8300allyesconfig
arc defconfig
sh   allmodconfig
parisc  defconfig
s390 allmodconfig
parisc   allyesconfig
s390defconfig
sparcallyesconfig
sparc   defconfig
i386defconfig
mips allyesconfig
mips allmodconfig
powerpc  allyesconfig
powerpc  allmodconfig
x86_64   randconfig-a004-20210408
x86_64   randconfig-a005-20210408
x86_64   randconfig-a003-20210408
x86_64   randconfig-a001-20210408
x86_64   randconfig-a002-20210408
x86_64   randconfig-a006-20210408
i386 randconfig-a006-20210408
i386 randconfig-a003-20210408
i386 randconfig-a001-20210408
i386 randconfig-a004-20210408
i386 randconfig-a005-20210408
i386 randconfig-a002-20210408
i386 randconfig-a014-20210408
i386 randconfig-a016-20210408
i386 randconfig-a011-20210408
i386 randconfig-a012-20210408
i386 randconfig-a013-20210408
i386 randconfig-a015-20210408
riscvnommu_virt_defconfig
riscv allnoconfig
riscv   defconfig
riscv  rv32_defconfig
um   allyesconfig
um  defconfig
x86_64rhel-8.3-kselftests
x86_64  defconfig
x86_64   rhel-8.3
x86_64  rhel-8.3-kbuiltin
x86_64  kexec

clang tested configs:
x86_64   randconfig-a014-20210408
x86_64   randconfig-a015-20210408
x86_64   randconfig-a012-20210408
x86_64   randconfig-a011-20210408
x86_64   randconfig-a013-20210408
x86_64   randconfig-a016-20210408

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[driver-core:kbuild] BUILD SUCCESS 495abc42c6389715b058a9abd534c966cb6b1f41

2021-04-08 Thread kernel test robot
tree/branch: 
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git kbuild
branch HEAD: 495abc42c6389715b058a9abd534c966cb6b1f41  kbuild: allow arches to 
have their own "bootloader.sh"

elapsed time: 720m

configs tested: 125
configs skipped: 2

The following configs have been built successfully.
More configs may be tested in the coming days.

gcc tested configs:
arm defconfig
arm64allyesconfig
arm64   defconfig
arm  allyesconfig
arm  allmodconfig
x86_64   allyesconfig
riscvallmodconfig
riscvallyesconfig
i386 allyesconfig
powerpc akebono_defconfig
arm eseries_pxa_defconfig
armpleb_defconfig
m68k amcore_defconfig
sparc   sparc32_defconfig
powerpc ppa8548_defconfig
mips loongson1b_defconfig
x86_64   alldefconfig
mipsmaltaup_xpa_defconfig
xtensa  cadence_csp_defconfig
powerpcsocrates_defconfig
shshmin_defconfig
h8300alldefconfig
powerpc  pmac32_defconfig
sh  landisk_defconfig
powerpc  arches_defconfig
mips  rb532_defconfig
riscv   defconfig
openrisc alldefconfig
mips   ip27_defconfig
arm s3c6400_defconfig
mips  malta_defconfig
arm orion5x_defconfig
armzeus_defconfig
arm  footbridge_defconfig
powerpcwarp_defconfig
mips   ip22_defconfig
m68k  multi_defconfig
sh  lboxre2_defconfig
armlart_defconfig
arm64alldefconfig
powerpc mpc5200_defconfig
powerpc  ep88xc_defconfig
m68k  amiga_defconfig
arm  colibri_pxa270_defconfig
arm shannon_defconfig
powerpc xes_mpc85xx_defconfig
arm at91_dt_defconfig
mips  decstation_64_defconfig
arm  pxa3xx_defconfig
sh   sh7724_generic_defconfig
arcvdk_hs38_smp_defconfig
mips   ip32_defconfig
arc nsimosci_hs_defconfig
armrealview_defconfig
armmvebu_v7_defconfig
sh  sh7785lcr_32bit_defconfig
arm  collie_defconfig
ia64 allmodconfig
ia64defconfig
ia64 allyesconfig
m68k allmodconfig
m68kdefconfig
m68k allyesconfig
nios2   defconfig
arc  allyesconfig
nds32 allnoconfig
nds32   defconfig
nios2allyesconfig
cskydefconfig
alpha   defconfig
alphaallyesconfig
xtensa   allyesconfig
h8300allyesconfig
arc defconfig
sh   allmodconfig
parisc  defconfig
s390 allyesconfig
s390 allmodconfig
parisc   allyesconfig
s390defconfig
sparcallyesconfig
sparc   defconfig
i386defconfig
mips allyesconfig
mips allmodconfig
powerpc  allyesconfig
powerpc  allmodconfig
powerpc   allnoconfig
x86_64   randconfig-a004-20210408
x86_64   randconfig-a005-20210408
x86_64   randconfig-a003-20210408
x86_64   randconfig-a001-20210408
x86_64   randconfig-a002-20210408
x86_64   randconfig-a006-20210408
i386 randconfig-a006-20210408
i386 randconfig-a003-20210408
i386 randconfig-a001-20210408
i386 randconfig-a004-20210408
i386 randconfig-a005-20210408
i386 randconfig-a002-202

[staging:staging-testing 588/592] ERROR: modpost: "ni_count_valid_routes" [drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined!

2021-04-08 Thread kernel test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 
staging-testing
head:   4e35b91390fcd13bf46e12acd3b6f94a082a6cf3
commit: c82b130616e3aed2ff8c635353360978716c5762 [588/592] staging: comedi: Add 
Kconfig options to build unit test modules
config: microblaze-randconfig-r024-20210409 (attached as .config)
compiler: microblaze-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://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/commit/?id=c82b130616e3aed2ff8c635353360978716c5762
git remote add staging 
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
git fetch --no-tags staging staging-testing
git checkout c82b130616e3aed2ff8c635353360978716c5762
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross 
ARCH=microblaze 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>, old ones prefixed by <<):

>> ERROR: modpost: "ni_count_valid_routes" 
>> [drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined!
>> ERROR: modpost: "ni_assign_device_routes" 
>> [drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined!
>> ERROR: modpost: "ni_sort_device_routes" 
>> [drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined!
>> ERROR: modpost: "ni_find_route_set" 
>> [drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined!
>> ERROR: modpost: "ni_route_set_has_source" 
>> [drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined!
>> ERROR: modpost: "ni_lookup_route_register" 
>> [drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined!
>> ERROR: modpost: "ni_is_cmd_dest" 
>> [drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined!
>> ERROR: modpost: "ni_get_valid_routes" 
>> [drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined!
>> ERROR: modpost: "ni_find_route_source" 
>> [drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined!
>> ERROR: modpost: "ni_route_to_register" 
>> [drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined!

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


.config.gz
Description: application/gzip
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 2/2] media: staging/intel-ipu3: Fix set_fmt error handling

2021-04-08 Thread Tomasz Figa
On Mon, Mar 15, 2021 at 01:34:06PM +0100, Ricardo Ribalda wrote:
> If there in an error during a set_fmt, do not overwrite the previous
> sizes with the invalid config.
> 
> [   38.662975] ipu3-imgu :00:05.0: swiotlb buffer is full (sz: 4096 bytes)
> [   38.662980] DMA: Out of SW-IOMMU space for 4096 bytes at device 
> :00:05.0
> [   38.663010] general protection fault:  [#1] PREEMPT SMP
> 
> Cc: sta...@vger.kernel.org
> Fixes: 6d5f26f2e045 ("media: staging/intel-ipu3-v4l: reduce kernel stack 
> usage")
> Signed-off-by: Ricardo Ribalda 
> ---
>  drivers/staging/media/ipu3/ipu3-v4l2.c | 25 ++---
>  1 file changed, 14 insertions(+), 11 deletions(-)

Reviewed-by: Tomasz Figa 

Best regards,
Tomasz
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/1] drm/bridge: anx7625: send DPCD command to downstream

2021-04-08 Thread Xin Ji
Send DPCD command to downstream before anx7625 power down,
tell downstream into standby mode.

Signed-off-by: Xin Ji 
---
 drivers/gpu/drm/bridge/analogix/anx7625.c | 75 +++
 1 file changed, 75 insertions(+)

diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c 
b/drivers/gpu/drm/bridge/analogix/anx7625.c
index 65cc05982f82..53d2f0d0ee30 100644
--- a/drivers/gpu/drm/bridge/analogix/anx7625.c
+++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
@@ -124,6 +124,23 @@ static int anx7625_reg_write(struct anx7625_data *ctx,
return ret;
 }
 
+static int anx7625_reg_block_write(struct anx7625_data *ctx,
+  struct i2c_client *client,
+  u8 reg_addr, u8 len, u8 *buf)
+{
+   int ret;
+   struct device *dev = &client->dev;
+
+   i2c_access_workaround(ctx, client);
+
+   ret = i2c_smbus_write_i2c_block_data(client, reg_addr, len, buf);
+   if (ret < 0)
+   DRM_DEV_ERROR(dev, "write i2c block failed id=%x\n:%x",
+ client->addr, reg_addr);
+
+   return ret;
+}
+
 static int anx7625_write_or(struct anx7625_data *ctx,
struct i2c_client *client,
u8 offset, u8 mask)
@@ -195,6 +212,55 @@ static int wait_aux_op_finish(struct anx7625_data *ctx)
return val;
 }
 
+static int anx7625_aux_dpcd_write(struct anx7625_data *ctx,
+ u8 addrh, u8 addrm, u8 addrl,
+ u8 len, u8 *buf)
+{
+   struct device *dev = &ctx->client->dev;
+   int ret;
+   u8 cmd;
+
+   if (len > MAX_DPCD_BUFFER_SIZE) {
+   DRM_DEV_ERROR(dev, "exceed aux buffer len.\n");
+   return -EINVAL;
+   }
+
+   cmd = ((len - 1) << 4) | 0x08;
+
+   /* Set command and length */
+   ret = anx7625_reg_write(ctx, ctx->i2c.rx_p0_client,
+   AP_AUX_COMMAND, cmd);
+
+   /* Set aux access address */
+   ret |= anx7625_reg_write(ctx, ctx->i2c.rx_p0_client,
+AP_AUX_ADDR_7_0, addrl);
+   ret |= anx7625_reg_write(ctx, ctx->i2c.rx_p0_client,
+AP_AUX_ADDR_15_8, addrm);
+   ret |= anx7625_write_and(ctx, ctx->i2c.rx_p0_client,
+AP_AUX_ADDR_19_16, addrh);
+
+   /* Set write data */
+   ret |= anx7625_reg_block_write(ctx, ctx->i2c.rx_p0_client,
+  AP_AUX_BUFF_START, len, buf);
+   /* Enable aux access */
+   ret |= anx7625_write_or(ctx, ctx->i2c.rx_p0_client,
+   AP_AUX_CTRL_STATUS, AP_AUX_CTRL_OP_EN);
+   if (ret < 0) {
+   DRM_DEV_ERROR(dev, "cannot access aux related register.\n");
+   return -EIO;
+   }
+
+   usleep_range(2000, 2100);
+
+   ret = wait_aux_op_finish(ctx);
+   if (ret) {
+   DRM_DEV_ERROR(dev, "aux IO error: wait aux op finish.\n");
+   return ret;
+   }
+
+   return 0;
+}
+
 static int anx7625_video_mute_control(struct anx7625_data *ctx,
  u8 status)
 {
@@ -617,6 +683,7 @@ static void anx7625_dp_stop(struct anx7625_data *ctx)
 {
struct device *dev = &ctx->client->dev;
int ret;
+   u8 data;
 
DRM_DEV_DEBUG_DRIVER(dev, "stop dp output\n");
 
@@ -628,8 +695,16 @@ static void anx7625_dp_stop(struct anx7625_data *ctx)
ret |= anx7625_write_and(ctx, ctx->i2c.tx_p2_client, 0x08, 0x7f);
 
ret |= anx7625_video_mute_control(ctx, 1);
+
+   DRM_DEV_DEBUG_DRIVER(dev, "notify downstream enter into standby\n");
+
+   /* Downstream monitor enter into standby mode */
+   data = 2;
+   ret |= anx7625_aux_dpcd_write(ctx, 0x00, 0x06, 0x00, 1, &data);
if (ret < 0)
DRM_DEV_ERROR(dev, "IO error : mute video fail\n");
+
+   return;
 }
 
 static int sp_tx_rst_aux(struct anx7625_data *ctx)
-- 
2.25.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[driver-core:tty-test] BUILD SUCCESS b01048f3d4ffec7ece16d4250d8eb2e13a5ce06a

2021-04-08 Thread kernel test robot
 allmodconfig
parisc   allyesconfig
s390defconfig
sparcallyesconfig
sparc   defconfig
i386defconfig
mips allyesconfig
mips allmodconfig
powerpc  allyesconfig
powerpc  allmodconfig
x86_64   randconfig-a004-20210408
x86_64   randconfig-a005-20210408
x86_64   randconfig-a003-20210408
x86_64   randconfig-a001-20210408
x86_64   randconfig-a002-20210408
x86_64   randconfig-a006-20210408
i386 randconfig-a006-20210408
i386 randconfig-a003-20210408
i386 randconfig-a001-20210408
i386 randconfig-a004-20210408
i386 randconfig-a005-20210408
i386 randconfig-a002-20210408
i386 randconfig-a014-20210408
i386 randconfig-a016-20210408
i386 randconfig-a011-20210408
i386 randconfig-a012-20210408
i386 randconfig-a013-20210408
i386 randconfig-a015-20210408
riscvnommu_k210_defconfig
riscvnommu_virt_defconfig
riscv allnoconfig
riscv   defconfig
riscv  rv32_defconfig
um   allmodconfig
um   allyesconfig
um  defconfig
x86_64rhel-8.3-kselftests
x86_64  defconfig
x86_64   rhel-8.3
x86_64  rhel-8.3-kbuiltin
x86_64  kexec

clang tested configs:
x86_64   randconfig-a014-20210408
x86_64   randconfig-a015-20210408
x86_64   randconfig-a012-20210408
x86_64   randconfig-a011-20210408
x86_64   randconfig-a013-20210408
x86_64   randconfig-a016-20210408

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel