[Bug 199407] New: Radeon night light/redshift flickers

2018-04-15 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=199407

Bug ID: 199407
   Summary: Radeon night light/redshift flickers
   Product: Drivers
   Version: 2.5
Kernel Version: 4.16
  Hardware: Other
OS: Linux
  Tree: Mainline
Status: NEW
  Severity: normal
  Priority: P1
 Component: Video(DRI - non Intel)
  Assignee: drivers_video-...@kernel-bugs.osdl.org
  Reporter: dan...@consultd.de
Regression: No

Hi, am no expert so cannot be more detailed...I love night light (GNOME
3.28/Redshift), am on AMDA9 with  Radeon R2 on Ubuntu 18.04 and just reverted
back to Kernel 4.14.34 bec with 4.16+ night light flickers when using mouse,
but no replicable "system" or cause ... just when moving  mouse it often
flickers ... not sure if this is already in 4.15, jumped that when moving to
Ubuntu 18.04... I have no idea how I can fix this, and by testing it is all
fine even with GNOME 3.28 with kernel 4.14.34, also never had issue on this
laptop before... some report this problem when using more than one screen, but
I have this issue on my one (and only) laptop screen, not having testing dual
screen yet 

Help pls

THx
Dan

-- 
You are receiving this mail because:
You are watching the assignee of the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 105996] [DC][CIK] Bonaire mobile - No displays being turned on

2018-04-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=105996

--- Comment #6 from Shawn Starr  ---
Step 12a) make scripts

-- 
You are receiving this mail because:
You are the assignee for the bug.___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [RFC 0/1] DRM Node Probing functionality

2018-04-15 Thread Tomasz Figa
Hi Rob,

On Thu, Apr 12, 2018 at 12:56 PM Robert Foss 
wrote:

> *Resend the whole actual series*

> This patch implements a simple function for matching DRM device FDs
against
> the desired properties of a device that you are looking for.

> The properties that are possible to look for are the elements of
DrmVersion
> and DrmDevice.

> The discussion that led to this series can be found here:
> https://lists.freedesktop.org/archives/mesa-dev/2018-January/183878.html

> In the previous discussion we left off having settled on implementing this
> in mesa/src/loader/loader.c, which I initially did. But the code ended up
being
> so generic that there's no reason for it not to live in libdrm, since it
can be
> used for any compositor and mesa.

> The implementer will still have to iterate through all of the devices
available
> on the target, and see if they match. This additional functionality could
be
> moved into libdrm at a later point if it turns out that all of the users
do this
> in the same manner.
> If there is some variety, for example with selecting fallback devices if
nothing
> matches maybe it is best left up to the user of libdrm.

> The biggest problem with the approach as implemented, the way I see it,
is how
> we match against the DrmVersion/DrmDevice of a given FD.
> Currently we use DrmVersion & DrmDevice as supplied by the caller to
define what
> we are looking for.
> This is a little bit problematic, especially for DrmDevice, since all of
the
> elements of the struct do not have enough bitspace to signal that we are
> uninterested in looking for that specific element. DrmDevice uses
> drmDevicesEqual() to do what amounts to a memcmp of the DrmDevice
argument and
> the one of the FD. So looking for any device on any PCI bus with just the
> PCI vendor ID supplied isn't possible.

> An alternative Daniel Stone suggested is adding enums for different
properties
> and allowing the caller to supply a list of properties that are
interesting and
> their values. In terms of long-term maintainership this might be less
pleasant
> than the  approach of the current implementation.

I'm personally okay with how patch 1 implements the matching. Thanks for
this work. Looking forward to the Mesa probing helper, which uses this! :)

P.S. I normally use my @chromium.org email for mailing lists.

Best regards,
Tomasz
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 105996] [DC][CIK] Bonaire mobile - No displays being turned on

2018-04-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=105996

--- Comment #5 from Shawn Starr  ---
For reference compiling amdgpu.ko with custom patch on a Fedora kernel:

1) rpm -ivh kernel-4.17.0-0.rc0.git7.2.fc29.src.rpm

2) Copy custom patch into rpmbuild/SOURCES

3) Modify kernel.spec to add patch into the listing

4) cd ~/rpmbuild/SPECS; rpmbuild -bp kernel.spec

5) cd ~/rpmbuild/BUILD/kernel-4.16.fc27/linux-4.17.0-0.rc0.git7.2.fc29.x86_64

6) vi Makefile --> add the proper matching kernel version
'-0.rc0.git7.2.fc29.x86_64' to EXTRAVERSION.

7) cp /boot/config-4.17.0-0.rc0.git7.2.fc29.x86_64
~/rpmbuild/BUILD/kernel/4.16.fc17/linux-4.17.0-0.rc0.git7.2.fc29.x86_64/.config

8) cp /lib/modules/4.17.0-0.rc0.git7.2.fc29.x86_64/build/Module.symvers
~/rpmbuild/BUILD/kernel/4.16.fc17/linux-4.17.0-0.rc0.git7.2.fc29.x86_64/

9) cd
~/rpmbuild/BUILD/kernel/4.16.fc17/linux-4.17.0-0.rc0.git7.2.fc29.x86_64/certs
&& cp ~/rpmbuild/SOURCES/x509.genkey .

10) cd .. && make certs

11) make modules_prepare

12) make M= drivers/gpu/drm/amd/amdgpu modules

13) ./scripts/sign-file sha256 certs/signing_key.pem certs/signing_key.x509 
drivers/gpu/drm/amd/amdgpu/amdgpu.ko

14) compress kernel modules with xz

15) Replace/move original in
/lib/modules/4.17.0-0.rc0.git7.2.fc29.x86_64/drives/dpu/drm/amd/amdgpu/ of way

16) depmod -a

17) Remove old initramfs and rebuild with dracut

-- 
You are receiving this mail because:
You are the assignee for the bug.___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 105996] [DC][CIK] Bonaire mobile - No displays being turned on

2018-04-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=105996

--- Comment #4 from Shawn Starr  ---
Created attachment 138858
  --> https://bugs.freedesktop.org/attachment.cgi?id=138858=edit
kernel dmesg boot with LVDS panels patch added

-- 
You are receiving this mail because:
You are the assignee for the bug.___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] drm/amdgpu/acp: Fix slab-out-of-bounds in mfd_add_device in acp_hw_init

2018-04-15 Thread Agrawal, Akshu



On 4/13/2018 9:45 PM, Daniel Kurtz wrote:

Commit 51f7415039d4 ("drm/amd/amdgpu: creating two I2S instances for
stoney/cz") added support for the "BT_I2S" ACP i2s channel.  As part of
this change, one additional acp resource was added, but the "num_resource"
count was accidentally incremented by 2.

This incorrect count eventually causes mfd_add_device() to try to access
an invalid memory address (the location of non-existent resource 5.

This fault was detected by running a KASAN enabled kernel, which produced
the following splat at boot:

[6.612987] 
==
[6.613509] BUG: KASAN: slab-out-of-bounds in mfd_add_device+0x4bc/0x7a7
[6.613509] Read of size 8 at addr 880107d4dc58 by task swapper/0/1
[6.613509]
[6.613509] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.14.33 #349
[6.613509] Hardware name: Google Grunt/Grunt, BIOS 
Google_Grunt.10543.0.2018_04_03_1812 04/02/2018
[6.613509] Call Trace:
[6.613509]  dump_stack+0x4d/0x63
[6.613509]  print_address_description+0x80/0x2d6
[6.613509]  ? mfd_add_device+0x4bc/0x7a7
[6.613509]  kasan_report+0x255/0x295
[6.613509]  mfd_add_device+0x4bc/0x7a7
[6.613509]  ? kasan_kmalloc+0x99/0xa8
[6.613509]  ? mfd_add_devices+0x58/0xe4
[6.613509]  ? __kmalloc+0x154/0x178
[6.613509]  mfd_add_devices+0xa5/0xe4
[6.613509]  acp_hw_init+0x92e/0xc4a
[6.613509]  amdgpu_device_init+0x1dfb/0x22a2
[6.613509]  ? kmalloc_order+0x53/0x5d
[6.613509]  ? kmalloc_order_trace+0x23/0xb3
[6.613509]  amdgpu_driver_load_kms+0xce/0x267
[6.613509]  drm_dev_register+0x169/0x2fb
[6.613509]  amdgpu_pci_probe+0x217/0x242
[6.613509]  pci_device_probe+0x101/0x18e
[6.613509]  driver_probe_device+0x1dd/0x419
[6.613509]  ? ___might_sleep+0x80/0x1b6
[6.613509]  __driver_attach+0x9f/0xc9
[6.613509]  ? driver_probe_device+0x419/0x419
[6.613509]  bus_for_each_dev+0xbc/0xe1
[6.613509]  bus_add_driver+0x189/0x2c0
[6.613509]  driver_register+0x108/0x156
[6.613509]  ? ttm_init+0x67/0x67
[6.613509]  do_one_initcall+0xb2/0x161
[6.613509]  kernel_init_freeable+0x25a/0x308
[6.613509]  ? rest_init+0xcc/0xcc
[6.613509]  kernel_init+0x11/0x10d
[6.613509]  ? rest_init+0xcc/0xcc
[6.613509]  ret_from_fork+0x22/0x40
[6.613509]
[6.613509] Allocated by task 1:
[6.613509]  save_stack+0x46/0xce
[6.613509]  kasan_kmalloc+0x99/0xa8
[6.613509]  kmem_cache_alloc_trace+0x11a/0x13e
[6.613509]  acp_hw_init+0x210/0xc4a
[6.613509]  amdgpu_device_init+0x1dfb/0x22a2
[6.613509]  amdgpu_driver_load_kms+0xce/0x267
[6.613509]  drm_dev_register+0x169/0x2fb
[6.613509]  amdgpu_pci_probe+0x217/0x242
[6.613509]  pci_device_probe+0x101/0x18e
[6.613509]  driver_probe_device+0x1dd/0x419
[6.613509]  __driver_attach+0x9f/0xc9
[6.613509]  bus_for_each_dev+0xbc/0xe1
[6.613509]  bus_add_driver+0x189/0x2c0
[6.613509]  driver_register+0x108/0x156
[6.613509]  do_one_initcall+0xb2/0x161
[6.613509]  kernel_init_freeable+0x25a/0x308
[6.613509]  kernel_init+0x11/0x10d
[6.613509]  ret_from_fork+0x22/0x40
[6.613509]
[6.613509] Freed by task 0:
[6.613509] (stack is not available)
[6.613509]
[6.613509] The buggy address belongs to the object at 880107d4db08
[6.613509]  which belongs to the cache kmalloc-512 of size 512
[6.613509] The buggy address is located 336 bytes inside of
[6.613509]  512-byte region [880107d4db08, 880107d4dd08)
[6.613509] The buggy address belongs to the page:
[6.613509] page:ea00041f5300 count:1 mapcount:0 mapping:  
(null) index:0x0 compound_mapcount: 0
[6.613509] flags: 0x80008100(slab|head)
[6.613509] raw: 80008100   
000100120012
[6.613509] raw: ea0004208520 88010b001680 88010b002cc0 

[6.613509] page dumped because: kasan: bad access detected
[6.613509]
[6.613509] Memory state around the buggy address:
[6.613509]  880107d4db00: fc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00
[6.613509]  880107d4db80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00
[6.613509] >880107d4dc00: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc 
fc
[6.613509] ^
[6.613509]  880107d4dc80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc 
fc
[6.613509]  880107d4dd00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc 
fc
[6.613509] 
==

Fixes: 51f7415039d4 ("drm/amd/amdgpu: creating two I2S instances for stoney/cz")
Signed-off-by: Daniel Kurtz 

Acked-by: Akshu Agrawal 


---
  drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 

[Bug 106056] weird artifacts in top right corner when rendering with firefox or unigine heaven

2018-04-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=106056

--- Comment #1 from b...@besd.de  ---
Created attachment 138851
  --> https://bugs.freedesktop.org/attachment.cgi?id=138851=edit
WebGL

-- 
You are receiving this mail because:
You are the assignee for the bug.___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 106056] weird artifacts in top right corner when rendering with firefox or unigine heaven

2018-04-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=106056

Bug ID: 106056
   Summary: weird artifacts in top right corner when rendering
with firefox or unigine heaven
   Product: Mesa
   Version: git
  Hardware: Other
OS: All
Status: NEW
  Severity: normal
  Priority: medium
 Component: Drivers/Gallium/radeonsi
  Assignee: dri-devel@lists.freedesktop.org
  Reporter: b...@besd.de
QA Contact: dri-devel@lists.freedesktop.org

Created attachment 138850
  --> https://bugs.freedesktop.org/attachment.cgi?id=138850=edit
Unigine Heaven - looks like remnants of previous draws

See screenshots, I think it has been there for a while didnt have time to
report

Reproduce with (quite likely with older versions as well):
firefox 59.0.2
Mesa git - radeonsi - RX560 4GB
kernel 4.16.0

artifacts:
https://threejs.org/examples/#webgl_geometry_colors

no artifacts:
https://threejs.org/examples/#webgl_geometry_minecraft

artifacts:
Unigine Heaven

no artifacts
Unigine Valley / Superposition

-- 
You are receiving this mail because:
You are the assignee for the bug.___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 106053] Drawing at screen boundary is very slow.

2018-04-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=106053

Marek Olšák  changed:

   What|Removed |Added

 Resolution|--- |NOTABUG
 Status|NEW |RESOLVED

--- Comment #2 from Marek Olšák  ---
r300-r500 hardware capabilities don't meet the requirements of OpenGL core
profile.

r300g on RC410 uses software emulation for vertex shaders and clipping (the
same code as llvmpipe), because the hardware doesn't have any vertex processor
and clipper.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 104412] RX 460 HDMI 4k 60fps not working, DisplayPort is.

2018-04-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=104412

--- Comment #17 from S.H.  ---
Hi,
flickering also present with Kernel-4.16.2.

Sven

-- 
You are receiving this mail because:
You are the assignee for the bug.___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 105797] Tracker for YoYo based games start-up crashes

2018-04-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=105797

--- Comment #4 from Sebastian Parborg  ---
I would like to add the game "Minit" to this list:
http://store.steampowered.com/app/609490/Minit/

The game was released quite recently (4th of April) and I can not start this
game without using the debug commands you provided Timothy.

I have attached the gdb backtrace log when running without those.
I'm using radeonsi (290x) and latest llvm and mesa from git master.

It seems like this segfault is not only limited to mesa/AMD. This guy has the
same problem but on nvidia hardware:
https://steamcommunity.com/app/609490/discussions/0/1696043806553649494/

If I can help you in any other way, please tell me. I'll gladly try out patches
or provide more logs.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 105797] Tracker for YoYo based games start-up crashes

2018-04-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=105797

--- Comment #3 from Sebastian Parborg  ---
Created attachment 138845
  --> https://bugs.freedesktop.org/attachment.cgi?id=138845=edit
Minit backtrace log

-- 
You are receiving this mail because:
You are the assignee for the bug.___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 106054] [vega10] powerplay non critical errors on vega 56 with vega 64bios

2018-04-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=106054

Bug ID: 106054
   Summary: [vega10] powerplay non critical errors on vega 56 with
vega 64bios
   Product: DRI
   Version: unspecified
  Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: NEW
  Severity: minor
  Priority: medium
 Component: DRM/AMDgpu
  Assignee: dri-devel@lists.freedesktop.org
  Reporter: tomenglun...@gmail.com

Hi so i have flashed the vega 64bios onto my 56 vega for the ramped up memory
voltage so i can run the core at ~1630mhz and mem at ~995 mhz, works fine in
both windows and linux, however i noticed some errors from powerplay in dmesg
at boot doing so. havent noticed any issue about it but thought il report them
anyways.

Radeon RX Vega (VEGA10, DRM 3.25.0, 4.16.0-rc7-gc698ca527893, LLVM 7.0.0)
Mesa 18.1.0-devel (git-6a519a157b)

[   14.816394] amdgpu: [powerplay] Cannot find UCLK in SOC_VDD-UCLK Dependency
Table!
[   14.816395] amdgpu: [powerplay] Failed to populate MCLK during
PopulateNewDPMClocksStates Function!
[   14.816395] amdgpu: [powerplay] Failed to populate and upload SCLK MCLK DPM
levels!
[   47.262630] amdgpu: [powerplay] Cannot find UCLK in SOC_VDD-UCLK Dependency
Table!
[   47.262631] amdgpu: [powerplay] Failed to populate MCLK during
PopulateNewDPMClocksStates Function!
[   47.262631] amdgpu: [powerplay] Failed to populate and upload SCLK MCLK DPM
levels!
[   47.264054] amdgpu: [powerplay] Cannot find UCLK in SOC_VDD-UCLK Dependency
Table!
[   47.264054] amdgpu: [powerplay] Failed to populate MCLK during
PopulateNewDPMClocksStates Function!
[   47.264055] amdgpu: [powerplay] Failed to populate and upload SCLK MCLK DPM
levels!

-- 
You are receiving this mail because:
You are the assignee for the bug.___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 106053] Drawing at screen boundary is very slow.

2018-04-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=106053

--- Comment #1 from Hi-Angel  ---
Can't comment on the rest, but

> And small question. Why Max core profile shows 0.0? Should I open another 
> bug-report?

This is because the OpenGL version r300g supports didn't have the separation to
core/compat profile. See also this comment
https://bugs.freedesktop.org/show_bug.cgi?id=103506#c8

-- 
You are receiving this mail because:
You are the assignee for the bug.___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 106053] Drawing at screen boundary is very slow.

2018-04-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=106053

Bug ID: 106053
   Summary: Drawing at screen boundary is very slow.
   Product: Mesa
   Version: unspecified
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: medium
 Component: Drivers/Gallium/r300
  Assignee: dri-devel@lists.freedesktop.org
  Reporter: cosiek...@o2.pl
QA Contact: dri-devel@lists.freedesktop.org
CC: alexdeuc...@gmail.com, emil.l.veli...@gmail.com,
hi-an...@yandex.ru, lem...@gmail.com,
madbiologist2...@outlook.com, mar...@gmail.com,
mark.a.ja...@intel.com, mic...@daenzer.net,
nhaeh...@gmail.com, nota...@gmail.com

Created attachment 138844
  --> https://bugs.freedesktop.org/attachment.cgi?id=138844=edit
bitmap for testing

When a partially visible sprites are drawn to the screen, fps drops really
badly.


code tested:
https://gist.github.com/vfjpl/bd442e34036547e4ccb05200762fa274

fully visible = 73.8 fps
fully invisible = 394 fps
partially visible = 5.75 fps


The same situation is happening on Allegro library. I don't know enough OpenGL
to test it directly.

I can provide more test results. Just ask me to do it.

Extended renderer info (GLX_MESA_query_renderer):
Vendor: X.Org R300 Project (0x1002)
Device: ATI RC410 (0x5a62)
Version: 17.3.7
Accelerated: yes
Video memory: 128MB
Unified memory: no
Preferred profile: compat (0x2)
Max core profile version: 0.0
Max compat profile version: 2.1
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 2.0


And small question. Why Max core profile shows 0.0? Should I open another
bug-report?

-- 
You are receiving this mail because:
You are the assignee for the bug.___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH v6 1/2] drm/bridge: Add Cadence DSI driver

2018-04-15 Thread Archit Taneja

Hi,

On Tuesday 10 April 2018 06:30 PM, Boris Brezillon wrote:

From: Boris Brezillon 

Add a driver for Cadence DPI -> DSI bridge.

This driver only support a subset of Cadence DSI bridge capabilities.

This driver has been tested/debugged in a simulated environment which
explains why some of the features are missing.  Here is a
non-exhaustive list of missing features:
  * burst mode
  * DPHY init/configuration steps
  * support for additional input interfaces (SDI input)

DSI commands and non-burst video mode have been tested.

Signed-off-by: Boris Brezillon 
Reviewed-by: Andrzej Hajda 
Acked-by: Eric Anholt 
---
Hello,

This version is still missing DPHY config/init code, mainly because I
don't have a DPHY (either real or emulated) to test with. But I'm
working on a DPHY abstraction layer to help extract common DPHY
operations out of DSI drivers so that DPHY drivers can be used outside
of the DRM world (I know D-PHYs can be used with CSI which belongs in
V4L).

Regards,

Boris

This version is still missing

Changes in v6:
- Use SPDX header
- Do not enable the sys_clk in the probe function
- Remove unneeded udelay()
- Add a function to make sure the PLL and pixel clock are close enough
   to be recoverable if they don't match exactly
- Add the DPHY init sequence used in simulation (likely to be different
   based on each SoC integration)

Changes in v5:
- Add runtime PM support

Changes in v4:
- Fix typos
- Rename clks as suggested by Tomi
- Fix DSI setup done in cdns_dsi_bridge_enable()
- Add a precision about where this bridge is supposed to used to the
   Kconfig entry
- Let DRM_CDNS_DSI select DRM_PANEL_BRIDGE
- Remove the IP version from the DT compatible name
- Adapt register the layout to match the one used in the last revision
   of the IP (hopefully the final version)

Changes in v3:
- replace magic values by real timing calculation. The DPHY PLL clock
   is still hardcoded since we don't have a working DPHY block yet, and
   this is the piece of HW we need to dynamically configure the PLL
   rate based on the display refresh rate and the resolution.
- parse DSI devices represented with the OF-graph. This is needed to
   support DSI devices controlled through an external bus like I2C or
   SPI.
- use the DRM panel-bridge infrastructure to simplify the DRM panel
   logic

Changes in v2:
- rebase on v4.12-rc1 and adapt to driver to the drm_bridge API changes
- return the correct error when devm_clk_get(sysclk) fails
- add missing depends on OF and select DRM_PANEL in the Kconfig entry

DSI runtime PM
---
  drivers/gpu/drm/bridge/Kconfig|   10 +
  drivers/gpu/drm/bridge/Makefile   |1 +
  drivers/gpu/drm/bridge/cdns-dsi.c | 1624 +
  3 files changed, 1635 insertions(+)
  create mode 100644 drivers/gpu/drm/bridge/cdns-dsi.c

diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig
index 3aa65bdecb0e..1cd267880b53 100644
--- a/drivers/gpu/drm/bridge/Kconfig
+++ b/drivers/gpu/drm/bridge/Kconfig
@@ -25,6 +25,16 @@ config DRM_ANALOGIX_ANX78XX
  the HDMI output of an application processor to MyDP
  or DisplayPort.
  
+config DRM_CDNS_DSI

+   tristate "Cadence DPI/DSI bridge"
+   select DRM_KMS_HELPER
+   select DRM_MIPI_DSI
+   select DRM_PANEL_BRIDGE
+   depends on OF
+   help
+ Support Cadence DPI to DSI bridge. This is an internal
+ bridge and is meant to be directly embedded in a SoC.
+
  config DRM_DUMB_VGA_DAC
tristate "Dumb VGA DAC Bridge support"
depends on OF
diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile
index 373eb28f31ed..aea7cbe9070b 100644
--- a/drivers/gpu/drm/bridge/Makefile
+++ b/drivers/gpu/drm/bridge/Makefile
@@ -1,5 +1,6 @@
  # SPDX-License-Identifier: GPL-2.0
  obj-$(CONFIG_DRM_ANALOGIX_ANX78XX) += analogix-anx78xx.o
+obj-$(CONFIG_DRM_CDNS_DSI) += cdns-dsi.o
  obj-$(CONFIG_DRM_DUMB_VGA_DAC) += dumb-vga-dac.o
  obj-$(CONFIG_DRM_LVDS_ENCODER) += lvds-encoder.o
  obj-$(CONFIG_DRM_MEGACHIPS_STDP_GE_B850V3_FW) += 
megachips-stdp-ge-b850v3-fw.o
diff --git a/drivers/gpu/drm/bridge/cdns-dsi.c 
b/drivers/gpu/drm/bridge/cdns-dsi.c
new file mode 100644
index ..d4ceb961f475
--- /dev/null
+++ b/drivers/gpu/drm/bridge/cdns-dsi.c
@@ -0,0 +1,1624 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright: 2017 Cadence Design Systems, Inc.
+ *
+ * Author: Boris Brezillon 
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#define IP_CONF0x0
+#define SP_HS_FIFO_DEPTH(x)(((x) & GENMASK(30, 26)) >> 26)
+#define SP_LP_FIFO_DEPTH(x)(((x) & GENMASK(25, 21)) >> 21)
+#define VRS_FIFO_DEPTH(x)  (((x)