Re: [PATCH v7 01/10] drm: bridge: Add Samsung DSIM bridge driver

2022-10-28 Thread Jagan Teki
On Tue, Oct 18, 2022 at 8:35 AM Jagan Teki  wrote:
>
> On Mon, Oct 17, 2022 at 2:31 PM Marek Szyprowski
>  wrote:
> >
> > Hi,
> >
> > On 17.10.2022 10:48, Marek Vasut wrote:
> > > On 10/17/22 09:43, Jagan Teki wrote:
> > >> On Mon, Oct 17, 2022 at 12:49 PM Marek Vasut  wrote:
> > >>> On 10/17/22 04:49, Jagan Teki wrote:
> >  On Sun, Oct 16, 2022 at 3:16 AM Marek Vasut  wrote:
> > >
> > > On 10/5/22 17:13, Jagan Teki wrote:
> > >> Samsung MIPI DSIM controller is common DSI IP that can be used in
> > >> various
> > >> SoCs like Exynos, i.MX8M Mini/Nano.
> > >>
> > >> In order to access this DSI controller between various platform
> > >> SoCs,
> > >> the ideal way to incorporate this in the drm stack is via the drm
> > >> bridge
> > >> driver.
> > >>
> > >> This patch is trying to differentiate platform-specific and
> > >> bridge driver
> > >> code by maintaining exynos platform glue code in exynos_drm_dsi.c
> > >> driver
> > >> and common bridge driver code in samsung-dsim.c providing that
> > >> the new
> > >> platform-specific glue should be supported in the bridge driver,
> > >> unlike
> > >> exynos platform drm drivers.
> > >>
> > >> - Add samsung_dsim_plat_data for keeping platform-specific
> > >> attributes like
> > >>  host_ops, irq_ops, and hw_type.
> > >>
> > >> - Initialize the plat_data hooks for exynos platform in
> > >> exynos_drm_dsi.c.
> > >>
> > >> - samsung_dsim_probe is the common probe call across
> > >> exynos_drm_dsi.c and
> > >>  samsung-dsim.c.
> > >>
> > >> - plat_data hooks like host_ops and irq_ops are invoked during the
> > >>  respective bridge call chains.
> > >
> > > Maybe the Subject should say "Split ... driver" or "Move ...
> > > driver" ,
> > > since it is not adding a new driver here ?
> > 
> >  Though it is not added a completely new driver, it is adding more
> >  infrastructure platform code to be compatible with both Exynos and
> >  i.MX8M. This is the prime reason for adding that commit head and
> >  explaining the same in the commit body.
> > >>>
> > >>> Diffstat looks like this:
> > >>>
> > >>>drivers/gpu/drm/bridge/samsung-dsim.c   | 1703
> > >>> ++
> > >>>drivers/gpu/drm/exynos/Kconfig  |1 +
> > >>>drivers/gpu/drm/exynos/exynos_drm_dsi.c | 1766
> > >>> ++-
> > >>>include/drm/bridge/samsung-dsim.h   |  113 ++
> > >>>7 files changed, 1952 insertions(+), 1653 deletions(-)
> > >>>
> > >>> Looks to me like most of the code is just moved from existing driver in
> > >>> this patch.
> > >>
> > >> Yeah, as I explained (from commit) it is moved, updated, and written
> > >> the plat code. How about this head?
> > >>
> > >> "drm: bridge: Add Samsung DSIM bridge (Split from exynos_drm_dsi)"
> > >
> > > I disagree with the "Add" part of the Subject, but I'll wait for
> > > others' opinion here.
> >
> > Maybe something like a "Generalize Exynos-DSI DRM driver into a generic
> > Samsung DSIM bridge"?

I'm using this commit head for next version patches, hope all Okay with it.

Thanks,
Jagan.


Re: [PATCH v7 01/10] drm: bridge: Add Samsung DSIM bridge driver

2022-10-17 Thread Jagan Teki
On Mon, Oct 17, 2022 at 2:31 PM Marek Szyprowski
 wrote:
>
> Hi,
>
> On 17.10.2022 10:48, Marek Vasut wrote:
> > On 10/17/22 09:43, Jagan Teki wrote:
> >> On Mon, Oct 17, 2022 at 12:49 PM Marek Vasut  wrote:
> >>> On 10/17/22 04:49, Jagan Teki wrote:
>  On Sun, Oct 16, 2022 at 3:16 AM Marek Vasut  wrote:
> >
> > On 10/5/22 17:13, Jagan Teki wrote:
> >> Samsung MIPI DSIM controller is common DSI IP that can be used in
> >> various
> >> SoCs like Exynos, i.MX8M Mini/Nano.
> >>
> >> In order to access this DSI controller between various platform
> >> SoCs,
> >> the ideal way to incorporate this in the drm stack is via the drm
> >> bridge
> >> driver.
> >>
> >> This patch is trying to differentiate platform-specific and
> >> bridge driver
> >> code by maintaining exynos platform glue code in exynos_drm_dsi.c
> >> driver
> >> and common bridge driver code in samsung-dsim.c providing that
> >> the new
> >> platform-specific glue should be supported in the bridge driver,
> >> unlike
> >> exynos platform drm drivers.
> >>
> >> - Add samsung_dsim_plat_data for keeping platform-specific
> >> attributes like
> >>  host_ops, irq_ops, and hw_type.
> >>
> >> - Initialize the plat_data hooks for exynos platform in
> >> exynos_drm_dsi.c.
> >>
> >> - samsung_dsim_probe is the common probe call across
> >> exynos_drm_dsi.c and
> >>  samsung-dsim.c.
> >>
> >> - plat_data hooks like host_ops and irq_ops are invoked during the
> >>  respective bridge call chains.
> >
> > Maybe the Subject should say "Split ... driver" or "Move ...
> > driver" ,
> > since it is not adding a new driver here ?
> 
>  Though it is not added a completely new driver, it is adding more
>  infrastructure platform code to be compatible with both Exynos and
>  i.MX8M. This is the prime reason for adding that commit head and
>  explaining the same in the commit body.
> >>>
> >>> Diffstat looks like this:
> >>>
> >>>drivers/gpu/drm/bridge/samsung-dsim.c   | 1703
> >>> ++
> >>>drivers/gpu/drm/exynos/Kconfig  |1 +
> >>>drivers/gpu/drm/exynos/exynos_drm_dsi.c | 1766
> >>> ++-
> >>>include/drm/bridge/samsung-dsim.h   |  113 ++
> >>>7 files changed, 1952 insertions(+), 1653 deletions(-)
> >>>
> >>> Looks to me like most of the code is just moved from existing driver in
> >>> this patch.
> >>
> >> Yeah, as I explained (from commit) it is moved, updated, and written
> >> the plat code. How about this head?
> >>
> >> "drm: bridge: Add Samsung DSIM bridge (Split from exynos_drm_dsi)"
> >
> > I disagree with the "Add" part of the Subject, but I'll wait for
> > others' opinion here.
>
> Maybe something like a "Generalize Exynos-DSI DRM driver into a generic
> Samsung DSIM bridge"?

I agreed.

Jagan.


Re: [PATCH v7 01/10] drm: bridge: Add Samsung DSIM bridge driver

2022-10-17 Thread Marek Szyprowski
Hi,

On 17.10.2022 10:48, Marek Vasut wrote:
> On 10/17/22 09:43, Jagan Teki wrote:
>> On Mon, Oct 17, 2022 at 12:49 PM Marek Vasut  wrote:
>>> On 10/17/22 04:49, Jagan Teki wrote:
 On Sun, Oct 16, 2022 at 3:16 AM Marek Vasut  wrote:
>
> On 10/5/22 17:13, Jagan Teki wrote:
>> Samsung MIPI DSIM controller is common DSI IP that can be used in 
>> various
>> SoCs like Exynos, i.MX8M Mini/Nano.
>>
>> In order to access this DSI controller between various platform 
>> SoCs,
>> the ideal way to incorporate this in the drm stack is via the drm 
>> bridge
>> driver.
>>
>> This patch is trying to differentiate platform-specific and 
>> bridge driver
>> code by maintaining exynos platform glue code in exynos_drm_dsi.c 
>> driver
>> and common bridge driver code in samsung-dsim.c providing that 
>> the new
>> platform-specific glue should be supported in the bridge driver, 
>> unlike
>> exynos platform drm drivers.
>>
>> - Add samsung_dsim_plat_data for keeping platform-specific 
>> attributes like
>>  host_ops, irq_ops, and hw_type.
>>
>> - Initialize the plat_data hooks for exynos platform in 
>> exynos_drm_dsi.c.
>>
>> - samsung_dsim_probe is the common probe call across 
>> exynos_drm_dsi.c and
>>  samsung-dsim.c.
>>
>> - plat_data hooks like host_ops and irq_ops are invoked during the
>>  respective bridge call chains.
>
> Maybe the Subject should say "Split ... driver" or "Move ... 
> driver" ,
> since it is not adding a new driver here ?

 Though it is not added a completely new driver, it is adding more
 infrastructure platform code to be compatible with both Exynos and
 i.MX8M. This is the prime reason for adding that commit head and
 explaining the same in the commit body.
>>>
>>> Diffstat looks like this:
>>>
>>>    drivers/gpu/drm/bridge/samsung-dsim.c   | 1703 
>>> ++
>>>    drivers/gpu/drm/exynos/Kconfig  |    1 +
>>>    drivers/gpu/drm/exynos/exynos_drm_dsi.c | 1766 
>>> ++-
>>>    include/drm/bridge/samsung-dsim.h   |  113 ++
>>>    7 files changed, 1952 insertions(+), 1653 deletions(-)
>>>
>>> Looks to me like most of the code is just moved from existing driver in
>>> this patch.
>>
>> Yeah, as I explained (from commit) it is moved, updated, and written
>> the plat code. How about this head?
>>
>> "drm: bridge: Add Samsung DSIM bridge (Split from exynos_drm_dsi)"
>
> I disagree with the "Add" part of the Subject, but I'll wait for 
> others' opinion here.

Maybe something like a "Generalize Exynos-DSI DRM driver into a generic 
Samsung DSIM bridge"?

Best regards
-- 
Marek Szyprowski, PhD
Samsung R Institute Poland



Re: [PATCH v7 01/10] drm: bridge: Add Samsung DSIM bridge driver

2022-10-17 Thread Marek Vasut

On 10/17/22 09:43, Jagan Teki wrote:

On Mon, Oct 17, 2022 at 12:49 PM Marek Vasut  wrote:


On 10/17/22 04:49, Jagan Teki wrote:

On Sun, Oct 16, 2022 at 3:16 AM Marek Vasut  wrote:


On 10/5/22 17:13, Jagan Teki wrote:

Samsung MIPI DSIM controller is common DSI IP that can be used in various
SoCs like Exynos, i.MX8M Mini/Nano.

In order to access this DSI controller between various platform SoCs,
the ideal way to incorporate this in the drm stack is via the drm bridge
driver.

This patch is trying to differentiate platform-specific and bridge driver
code by maintaining exynos platform glue code in exynos_drm_dsi.c driver
and common bridge driver code in samsung-dsim.c providing that the new
platform-specific glue should be supported in the bridge driver, unlike
exynos platform drm drivers.

- Add samsung_dsim_plat_data for keeping platform-specific attributes like
 host_ops, irq_ops, and hw_type.

- Initialize the plat_data hooks for exynos platform in exynos_drm_dsi.c.

- samsung_dsim_probe is the common probe call across exynos_drm_dsi.c and
 samsung-dsim.c.

- plat_data hooks like host_ops and irq_ops are invoked during the
 respective bridge call chains.


Maybe the Subject should say "Split ... driver" or "Move ... driver" ,
since it is not adding a new driver here ?


Though it is not added a completely new driver, it is adding more
infrastructure platform code to be compatible with both Exynos and
i.MX8M. This is the prime reason for adding that commit head and
explaining the same in the commit body.


Diffstat looks like this:

   drivers/gpu/drm/bridge/samsung-dsim.c   | 1703 ++
   drivers/gpu/drm/exynos/Kconfig  |1 +
   drivers/gpu/drm/exynos/exynos_drm_dsi.c | 1766 ++-
   include/drm/bridge/samsung-dsim.h   |  113 ++
   7 files changed, 1952 insertions(+), 1653 deletions(-)

Looks to me like most of the code is just moved from existing driver in
this patch.


Yeah, as I explained (from commit) it is moved, updated, and written
the plat code. How about this head?

"drm: bridge: Add Samsung DSIM bridge (Split from exynos_drm_dsi)"


I disagree with the "Add" part of the Subject, but I'll wait for others' 
opinion here.


Re: [PATCH v7 01/10] drm: bridge: Add Samsung DSIM bridge driver

2022-10-17 Thread Jagan Teki
On Mon, Oct 17, 2022 at 12:49 PM Marek Vasut  wrote:
>
> On 10/17/22 04:49, Jagan Teki wrote:
> > On Sun, Oct 16, 2022 at 3:16 AM Marek Vasut  wrote:
> >>
> >> On 10/5/22 17:13, Jagan Teki wrote:
> >>> Samsung MIPI DSIM controller is common DSI IP that can be used in various
> >>> SoCs like Exynos, i.MX8M Mini/Nano.
> >>>
> >>> In order to access this DSI controller between various platform SoCs,
> >>> the ideal way to incorporate this in the drm stack is via the drm bridge
> >>> driver.
> >>>
> >>> This patch is trying to differentiate platform-specific and bridge driver
> >>> code by maintaining exynos platform glue code in exynos_drm_dsi.c driver
> >>> and common bridge driver code in samsung-dsim.c providing that the new
> >>> platform-specific glue should be supported in the bridge driver, unlike
> >>> exynos platform drm drivers.
> >>>
> >>> - Add samsung_dsim_plat_data for keeping platform-specific attributes like
> >>> host_ops, irq_ops, and hw_type.
> >>>
> >>> - Initialize the plat_data hooks for exynos platform in exynos_drm_dsi.c.
> >>>
> >>> - samsung_dsim_probe is the common probe call across exynos_drm_dsi.c and
> >>> samsung-dsim.c.
> >>>
> >>> - plat_data hooks like host_ops and irq_ops are invoked during the
> >>> respective bridge call chains.
> >>
> >> Maybe the Subject should say "Split ... driver" or "Move ... driver" ,
> >> since it is not adding a new driver here ?
> >
> > Though it is not added a completely new driver, it is adding more
> > infrastructure platform code to be compatible with both Exynos and
> > i.MX8M. This is the prime reason for adding that commit head and
> > explaining the same in the commit body.
>
> Diffstat looks like this:
>
>   drivers/gpu/drm/bridge/samsung-dsim.c   | 1703 ++
>   drivers/gpu/drm/exynos/Kconfig  |1 +
>   drivers/gpu/drm/exynos/exynos_drm_dsi.c | 1766 ++-
>   include/drm/bridge/samsung-dsim.h   |  113 ++
>   7 files changed, 1952 insertions(+), 1653 deletions(-)
>
> Looks to me like most of the code is just moved from existing driver in
> this patch.

Yeah, as I explained (from commit) it is moved, updated, and written
the plat code. How about this head?

"drm: bridge: Add Samsung DSIM bridge (Split from exynos_drm_dsi)"

Jagan.


Re: [PATCH v7 01/10] drm: bridge: Add Samsung DSIM bridge driver

2022-10-17 Thread Marek Vasut

On 10/17/22 04:49, Jagan Teki wrote:

On Sun, Oct 16, 2022 at 3:16 AM Marek Vasut  wrote:


On 10/5/22 17:13, Jagan Teki wrote:

Samsung MIPI DSIM controller is common DSI IP that can be used in various
SoCs like Exynos, i.MX8M Mini/Nano.

In order to access this DSI controller between various platform SoCs,
the ideal way to incorporate this in the drm stack is via the drm bridge
driver.

This patch is trying to differentiate platform-specific and bridge driver
code by maintaining exynos platform glue code in exynos_drm_dsi.c driver
and common bridge driver code in samsung-dsim.c providing that the new
platform-specific glue should be supported in the bridge driver, unlike
exynos platform drm drivers.

- Add samsung_dsim_plat_data for keeping platform-specific attributes like
host_ops, irq_ops, and hw_type.

- Initialize the plat_data hooks for exynos platform in exynos_drm_dsi.c.

- samsung_dsim_probe is the common probe call across exynos_drm_dsi.c and
samsung-dsim.c.

- plat_data hooks like host_ops and irq_ops are invoked during the
respective bridge call chains.


Maybe the Subject should say "Split ... driver" or "Move ... driver" ,
since it is not adding a new driver here ?


Though it is not added a completely new driver, it is adding more
infrastructure platform code to be compatible with both Exynos and
i.MX8M. This is the prime reason for adding that commit head and
explaining the same in the commit body.


Diffstat looks like this:

 drivers/gpu/drm/bridge/samsung-dsim.c   | 1703 ++
 drivers/gpu/drm/exynos/Kconfig  |1 +
 drivers/gpu/drm/exynos/exynos_drm_dsi.c | 1766 ++-
 include/drm/bridge/samsung-dsim.h   |  113 ++
 7 files changed, 1952 insertions(+), 1653 deletions(-)

Looks to me like most of the code is just moved from existing driver in 
this patch.


Re: [PATCH v7 01/10] drm: bridge: Add Samsung DSIM bridge driver

2022-10-16 Thread Jagan Teki
On Sun, Oct 16, 2022 at 3:16 AM Marek Vasut  wrote:
>
> On 10/5/22 17:13, Jagan Teki wrote:
> > Samsung MIPI DSIM controller is common DSI IP that can be used in various
> > SoCs like Exynos, i.MX8M Mini/Nano.
> >
> > In order to access this DSI controller between various platform SoCs,
> > the ideal way to incorporate this in the drm stack is via the drm bridge
> > driver.
> >
> > This patch is trying to differentiate platform-specific and bridge driver
> > code by maintaining exynos platform glue code in exynos_drm_dsi.c driver
> > and common bridge driver code in samsung-dsim.c providing that the new
> > platform-specific glue should be supported in the bridge driver, unlike
> > exynos platform drm drivers.
> >
> > - Add samsung_dsim_plat_data for keeping platform-specific attributes like
> >host_ops, irq_ops, and hw_type.
> >
> > - Initialize the plat_data hooks for exynos platform in exynos_drm_dsi.c.
> >
> > - samsung_dsim_probe is the common probe call across exynos_drm_dsi.c and
> >samsung-dsim.c.
> >
> > - plat_data hooks like host_ops and irq_ops are invoked during the
> >respective bridge call chains.
>
> Maybe the Subject should say "Split ... driver" or "Move ... driver" ,
> since it is not adding a new driver here ?

Though it is not added a completely new driver, it is adding more
infrastructure platform code to be compatible with both Exynos and
i.MX8M. This is the prime reason for adding that commit head and
explaining the same in the commit body.

Jagan.


Re: [PATCH v7 01/10] drm: bridge: Add Samsung DSIM bridge driver

2022-10-15 Thread Marek Vasut

On 10/5/22 17:13, Jagan Teki wrote:

Samsung MIPI DSIM controller is common DSI IP that can be used in various
SoCs like Exynos, i.MX8M Mini/Nano.

In order to access this DSI controller between various platform SoCs,
the ideal way to incorporate this in the drm stack is via the drm bridge
driver.

This patch is trying to differentiate platform-specific and bridge driver
code by maintaining exynos platform glue code in exynos_drm_dsi.c driver
and common bridge driver code in samsung-dsim.c providing that the new
platform-specific glue should be supported in the bridge driver, unlike
exynos platform drm drivers.

- Add samsung_dsim_plat_data for keeping platform-specific attributes like
   host_ops, irq_ops, and hw_type.

- Initialize the plat_data hooks for exynos platform in exynos_drm_dsi.c.

- samsung_dsim_probe is the common probe call across exynos_drm_dsi.c and
   samsung-dsim.c.

- plat_data hooks like host_ops and irq_ops are invoked during the
   respective bridge call chains.


Maybe the Subject should say "Split ... driver" or "Move ... driver" , 
since it is not adding a new driver here ?


[PATCH v7 01/10] drm: bridge: Add Samsung DSIM bridge driver

2022-10-05 Thread Jagan Teki
Samsung MIPI DSIM controller is common DSI IP that can be used in various
SoCs like Exynos, i.MX8M Mini/Nano.

In order to access this DSI controller between various platform SoCs,
the ideal way to incorporate this in the drm stack is via the drm bridge
driver.

This patch is trying to differentiate platform-specific and bridge driver
code by maintaining exynos platform glue code in exynos_drm_dsi.c driver
and common bridge driver code in samsung-dsim.c providing that the new
platform-specific glue should be supported in the bridge driver, unlike
exynos platform drm drivers.

- Add samsung_dsim_plat_data for keeping platform-specific attributes like
  host_ops, irq_ops, and hw_type.

- Initialize the plat_data hooks for exynos platform in exynos_drm_dsi.c.

- samsung_dsim_probe is the common probe call across exynos_drm_dsi.c and
  samsung-dsim.c.

- plat_data hooks like host_ops and irq_ops are invoked during the
  respective bridge call chains.

v7:
* fix the drm bridge attach chain for exynos drm dsi driver
* fix the hw_type checking logic

v6:
* handle previous bridge pointer for exynos dsi

v5:
* [mszyprow] reworked driver initialization using the same approach as in
  drivers/gpu/drm/{exynos/exynos_dp.c, bridge/analogix/analogix_dp_core.c},
  removed weak functions, moved exynos_dsi_driver back to exynos_drm_dsi.c
  and restored integration with exynos_drm custom initialization.
* updated the commit message [Jagan]

v4:
* include Inki Dae in MAINTAINERS
* remove dsi_driver probe in exynos_drm_drv to support multi-arch build

v3:
* restore gpio related fixes
* restore proper bridge chain
* rework initialization issue
* fix header includes in proper way

v2:
* fixed exynos dsi driver conversion (Marek Szyprowski)
* updated commit message
* updated MAINTAINERS file

v1:
* don't maintain component_ops in bridge driver
* don't maintain platform glue code in bridge driver
* add platform-specific glue code and make a common bridge

Signed-off-by: Marek Szyprowski 
Signed-off-by: Jagan Teki 
---
 MAINTAINERS |9 +
 drivers/gpu/drm/bridge/Kconfig  |   12 +
 drivers/gpu/drm/bridge/Makefile |1 +
 drivers/gpu/drm/bridge/samsung-dsim.c   | 1703 ++
 drivers/gpu/drm/exynos/Kconfig  |1 +
 drivers/gpu/drm/exynos/exynos_drm_dsi.c | 1766 ++-
 include/drm/bridge/samsung-dsim.h   |  113 ++
 7 files changed, 1952 insertions(+), 1653 deletions(-)
 create mode 100644 drivers/gpu/drm/bridge/samsung-dsim.c
 create mode 100644 include/drm/bridge/samsung-dsim.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 9ae989b32ebb..ba7a6721443c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -6624,6 +6624,15 @@ T:   git git://anongit.freedesktop.org/drm/drm-misc
 F: Documentation/devicetree/bindings/display/panel/samsung,lms397kf04.yaml
 F: drivers/gpu/drm/panel/panel-samsung-db7430.c
 
+DRM DRIVER FOR SAMSUNG MIPI DSIM BRIDGE
+M: Jagan Teki 
+M: Marek Szyprowski 
+M: Inki Dae 
 S: Maintained
diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig
index 57946d80b02d..8e85dac9f53e 100644
--- a/drivers/gpu/drm/bridge/Kconfig
+++ b/drivers/gpu/drm/bridge/Kconfig
@@ -231,6 +231,18 @@ config DRM_PARADE_PS8640
  The PS8640 is a high-performance and low-power
  MIPI DSI to eDP converter
 
+config DRM_SAMSUNG_DSIM
+   tristate "Samsung MIPI DSIM bridge driver"
+   depends on COMMON_CLK
+   depends on OF && HAS_IOMEM
+   select DRM_KMS_HELPER
+   select DRM_MIPI_DSI
+   select DRM_PANEL_BRIDGE
+   help
+ The Samsung MIPI DSIM bridge controller driver.
+ This MIPI DSIM bridge can be found it on Exynos SoCs and
+ NXP's i.MX8M Mini/Nano.
+
 config DRM_SIL_SII8620
tristate "Silicon Image SII8620 HDMI/MHL bridge"
depends on OF
diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile
index 1884803c6860..dae843723991 100644
--- a/drivers/gpu/drm/bridge/Makefile
+++ b/drivers/gpu/drm/bridge/Makefile
@@ -15,6 +15,7 @@ obj-$(CONFIG_DRM_MEGACHIPS_STDP_GE_B850V3_FW) += 
megachips-stdp-ge-b850v
 obj-$(CONFIG_DRM_NXP_PTN3460) += nxp-ptn3460.o
 obj-$(CONFIG_DRM_PARADE_PS8622) += parade-ps8622.o
 obj-$(CONFIG_DRM_PARADE_PS8640) += parade-ps8640.o
+obj-$(CONFIG_DRM_SAMSUNG_DSIM) += samsung-dsim.o
 obj-$(CONFIG_DRM_SIL_SII8620) += sil-sii8620.o
 obj-$(CONFIG_DRM_SII902X) += sii902x.o
 obj-$(CONFIG_DRM_SII9234) += sii9234.o
diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c 
b/drivers/gpu/drm/bridge/samsung-dsim.c
new file mode 100644
index ..07563d00a420
--- /dev/null
+++ b/drivers/gpu/drm/bridge/samsung-dsim.c
@@ -0,0 +1,1703 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Samsung MIPI DSIM bridge driver.
+ *
+ * Copyright (C) 2021 Amarula Solutions(India)
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd
+ * Author: Jagan Teki 
+ *
+ * Based on exynos_drm_dsi from
+ * Tomasz Figa