All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
To: dri-devel@lists.freedesktop.org
Cc: Andy Yan <andy.yan@rock-chips.com>,
	Archit Taneja <architt@codeaurora.org>,
	Fabio Estevam <fabio.estevam@freescale.com>,
	Jose Abreu <Jose.Abreu@synopsys.com>,
	Kieran Bingham <kieran.bingham@ideasonboard.com>,
	Neil Armstrong <narmstrong@baylibre.com>,
	Nickey Yang <nickey.yang@rock-chips.com>,
	Russell King <rmk+kernel@arm.linux.org.uk>,
	Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>,
	linux-renesas-soc@vger.kernel.org
Subject: [PATCH v5 00/10] drm: bridge: dw-hdmi: Refactor PHY support
Date: Fri,  3 Mar 2017 19:19:57 +0200	[thread overview]
Message-ID: <20170303172007.26541-1-laurent.pinchart+renesas@ideasonboard.com> (raw)

Hello,

This patch series refactors all the PHY handling code in order to allow
support of vendor PHYs and Synopsys DWC HDMI 2.0 TX PHYs.

The series starts with a few cleanups and small fixes. Patch 01/10 just
removes unused code, patch 02/10 moves the color converter code out of the PHY
configure function as it isn't PHY-dependent, and patch 03/10 enables color
conversion even for DVI as it is needed to output RGB when the input format is
YUV.

The next two patches fix the power down (04/10) and up (05/10) sequences to
comply with the HDMI TX PHY specifications. They are the biggest functional
changes in the whole set, and have been tested successfully (with the rest of
the series) on i.MX6Q, RK3288 and R-Car H3. The PLL PHY lock delay has been
measured to be between 300µs and 350µs on R-Car H3, between 400µs and 600µs on
i.MX6Q and between 150µs and 450µs on RK3288. The PHY power down delay has
been measured to be less than 50µs on all platforms, and was often close to
instant with power down reported in the first poll iteration. We should thus
be more than safe with a 5ms timeout.

Patch 06/10 breaks the PHY operations out. Glue code is then allowed to pass a
PHY operations structure to support vendor PHYs. The existing PHY support code
is turned into a default Synopsys PHYs implementation for those PHY
operations.

Patch 07/10 further refactors the Synopsys PHY configuration function to make
it modular, in order to support DWC HDMI 2.0 TX PHYs that have a very
different register layout compared to the currently supported PHYs. Glue code
is again allowed to provide a custom PHY configuration implementation, with
the existing PHY support code turned into the default implementation for all
currently supported Synopsys PHYs.

Patch 08/10 is a small cleanup that removes the now unneeded device type for
glue code platform data, and patch 09/10 follows by switching the driver to
regmap in order to support vendor-specific register access more easily.

Patch 10/10 is a v5 addition that moves the code to a new directory per Jose's
request. v5 also picked up review tags from the mailing list, and is rebased
on top of the latest drm-misc-next branch. The series is otherwise unchanged
compared to v4.

Archit, how would you like to proceed to get this merged ?

Kieran Bingham (2):
  drm: bridge: dw-hdmi: Add support for custom PHY configuration
  drm: bridge: dw-hdmi: Remove device type from platform data

Laurent Pinchart (6):
  drm: bridge: dw-hdmi: Remove unused functions
  drm: bridge: dw-hdmi: Move CSC configuration out of PHY code
  drm: bridge: dw-hdmi: Fix the PHY power down sequence
  drm: bridge: dw-hdmi: Fix the PHY power up sequence
  drm: bridge: dw-hdmi: Create PHY operations
  drm: bridge: dw-hdmi: Move the driver to a separate directory.

Neil Armstrong (2):
  drm: bridge: dw-hdmi: Enable CSC even for DVI
  drm: bridge: dw-hdmi: Switch to regmap for register access

 drivers/gpu/drm/bridge/Kconfig                     |   2 +
 drivers/gpu/drm/bridge/Makefile                    |   4 +-
 drivers/gpu/drm/bridge/synopsys/Kconfig            |  23 +
 drivers/gpu/drm/bridge/synopsys/Makefile           |   5 +
 .../drm/bridge/{ => synopsys}/dw-hdmi-ahb-audio.c  |   0
 .../gpu/drm/bridge/{ => synopsys}/dw-hdmi-audio.h  |   0
 .../drm/bridge/{ => synopsys}/dw-hdmi-i2s-audio.c  |   0
 drivers/gpu/drm/bridge/{ => synopsys}/dw-hdmi.c    | 467 ++++++++++++---------
 drivers/gpu/drm/bridge/{ => synopsys}/dw-hdmi.h    |   0
 drivers/gpu/drm/imx/dw_hdmi-imx.c                  |   2 -
 drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c        |   1 -
 include/drm/bridge/dw_hdmi.h                       |  33 +-
 12 files changed, 335 insertions(+), 202 deletions(-)
 create mode 100644 drivers/gpu/drm/bridge/synopsys/Kconfig
 create mode 100644 drivers/gpu/drm/bridge/synopsys/Makefile
 rename drivers/gpu/drm/bridge/{ => synopsys}/dw-hdmi-ahb-audio.c (100%)
 rename drivers/gpu/drm/bridge/{ => synopsys}/dw-hdmi-audio.h (100%)
 rename drivers/gpu/drm/bridge/{ => synopsys}/dw-hdmi-i2s-audio.c (100%)
 rename drivers/gpu/drm/bridge/{ => synopsys}/dw-hdmi.c (88%)
 rename drivers/gpu/drm/bridge/{ => synopsys}/dw-hdmi.h (100%)

-- 
Regards,

Laurent Pinchart

WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
To: dri-devel@lists.freedesktop.org
Cc: Fabio Estevam <fabio.estevam@freescale.com>,
	Jose Abreu <Jose.Abreu@synopsys.com>,
	Neil Armstrong <narmstrong@baylibre.com>,
	Kieran Bingham <kieran.bingham@ideasonboard.com>,
	linux-renesas-soc@vger.kernel.org,
	Nickey Yang <nickey.yang@rock-chips.com>,
	Russell King <rmk+kernel@arm.linux.org.uk>,
	Andy Yan <andy.yan@rock-chips.com>,
	Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Subject: [PATCH v5 00/10] drm: bridge: dw-hdmi: Refactor PHY support
Date: Fri,  3 Mar 2017 19:19:57 +0200	[thread overview]
Message-ID: <20170303172007.26541-1-laurent.pinchart+renesas@ideasonboard.com> (raw)

Hello,

This patch series refactors all the PHY handling code in order to allow
support of vendor PHYs and Synopsys DWC HDMI 2.0 TX PHYs.

The series starts with a few cleanups and small fixes. Patch 01/10 just
removes unused code, patch 02/10 moves the color converter code out of the PHY
configure function as it isn't PHY-dependent, and patch 03/10 enables color
conversion even for DVI as it is needed to output RGB when the input format is
YUV.

The next two patches fix the power down (04/10) and up (05/10) sequences to
comply with the HDMI TX PHY specifications. They are the biggest functional
changes in the whole set, and have been tested successfully (with the rest of
the series) on i.MX6Q, RK3288 and R-Car H3. The PLL PHY lock delay has been
measured to be between 300µs and 350µs on R-Car H3, between 400µs and 600µs on
i.MX6Q and between 150µs and 450µs on RK3288. The PHY power down delay has
been measured to be less than 50µs on all platforms, and was often close to
instant with power down reported in the first poll iteration. We should thus
be more than safe with a 5ms timeout.

Patch 06/10 breaks the PHY operations out. Glue code is then allowed to pass a
PHY operations structure to support vendor PHYs. The existing PHY support code
is turned into a default Synopsys PHYs implementation for those PHY
operations.

Patch 07/10 further refactors the Synopsys PHY configuration function to make
it modular, in order to support DWC HDMI 2.0 TX PHYs that have a very
different register layout compared to the currently supported PHYs. Glue code
is again allowed to provide a custom PHY configuration implementation, with
the existing PHY support code turned into the default implementation for all
currently supported Synopsys PHYs.

Patch 08/10 is a small cleanup that removes the now unneeded device type for
glue code platform data, and patch 09/10 follows by switching the driver to
regmap in order to support vendor-specific register access more easily.

Patch 10/10 is a v5 addition that moves the code to a new directory per Jose's
request. v5 also picked up review tags from the mailing list, and is rebased
on top of the latest drm-misc-next branch. The series is otherwise unchanged
compared to v4.

Archit, how would you like to proceed to get this merged ?

Kieran Bingham (2):
  drm: bridge: dw-hdmi: Add support for custom PHY configuration
  drm: bridge: dw-hdmi: Remove device type from platform data

Laurent Pinchart (6):
  drm: bridge: dw-hdmi: Remove unused functions
  drm: bridge: dw-hdmi: Move CSC configuration out of PHY code
  drm: bridge: dw-hdmi: Fix the PHY power down sequence
  drm: bridge: dw-hdmi: Fix the PHY power up sequence
  drm: bridge: dw-hdmi: Create PHY operations
  drm: bridge: dw-hdmi: Move the driver to a separate directory.

Neil Armstrong (2):
  drm: bridge: dw-hdmi: Enable CSC even for DVI
  drm: bridge: dw-hdmi: Switch to regmap for register access

 drivers/gpu/drm/bridge/Kconfig                     |   2 +
 drivers/gpu/drm/bridge/Makefile                    |   4 +-
 drivers/gpu/drm/bridge/synopsys/Kconfig            |  23 +
 drivers/gpu/drm/bridge/synopsys/Makefile           |   5 +
 .../drm/bridge/{ => synopsys}/dw-hdmi-ahb-audio.c  |   0
 .../gpu/drm/bridge/{ => synopsys}/dw-hdmi-audio.h  |   0
 .../drm/bridge/{ => synopsys}/dw-hdmi-i2s-audio.c  |   0
 drivers/gpu/drm/bridge/{ => synopsys}/dw-hdmi.c    | 467 ++++++++++++---------
 drivers/gpu/drm/bridge/{ => synopsys}/dw-hdmi.h    |   0
 drivers/gpu/drm/imx/dw_hdmi-imx.c                  |   2 -
 drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c        |   1 -
 include/drm/bridge/dw_hdmi.h                       |  33 +-
 12 files changed, 335 insertions(+), 202 deletions(-)
 create mode 100644 drivers/gpu/drm/bridge/synopsys/Kconfig
 create mode 100644 drivers/gpu/drm/bridge/synopsys/Makefile
 rename drivers/gpu/drm/bridge/{ => synopsys}/dw-hdmi-ahb-audio.c (100%)
 rename drivers/gpu/drm/bridge/{ => synopsys}/dw-hdmi-audio.h (100%)
 rename drivers/gpu/drm/bridge/{ => synopsys}/dw-hdmi-i2s-audio.c (100%)
 rename drivers/gpu/drm/bridge/{ => synopsys}/dw-hdmi.c (88%)
 rename drivers/gpu/drm/bridge/{ => synopsys}/dw-hdmi.h (100%)

-- 
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

             reply	other threads:[~2017-03-03 17:29 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-03 17:19 Laurent Pinchart [this message]
2017-03-03 17:19 ` [PATCH v5 00/10] drm: bridge: dw-hdmi: Refactor PHY support Laurent Pinchart
2017-03-03 17:19 ` [PATCH v5 01/10] drm: bridge: dw-hdmi: Remove unused functions Laurent Pinchart
2017-03-03 17:19   ` Laurent Pinchart
2017-03-04  1:11   ` [PATCH v5.1 10/10] drm: bridge: dw-hdmi: Move the driver to a separate directory Laurent Pinchart
2017-03-04  1:11     ` Laurent Pinchart
2017-03-03 17:19 ` [PATCH v5 02/10] drm: bridge: dw-hdmi: Move CSC configuration out of PHY code Laurent Pinchart
2017-03-03 17:19   ` Laurent Pinchart
2017-03-03 17:20 ` [PATCH v5 03/10] drm: bridge: dw-hdmi: Enable CSC even for DVI Laurent Pinchart
2017-03-03 17:20   ` Laurent Pinchart
2017-03-03 17:20 ` [PATCH v5 04/10] drm: bridge: dw-hdmi: Fix the PHY power down sequence Laurent Pinchart
2017-03-03 17:20   ` Laurent Pinchart
2017-03-05 23:35   ` [PATCH v5.1 " Laurent Pinchart
2017-03-05 23:35     ` Laurent Pinchart
2017-03-03 17:20 ` [PATCH v5 05/10] drm: bridge: dw-hdmi: Fix the PHY power up sequence Laurent Pinchart
2017-03-03 17:20   ` Laurent Pinchart
2017-03-05 23:35   ` [PATCH v5.1 " Laurent Pinchart
2017-03-05 23:35     ` Laurent Pinchart
2017-03-03 17:20 ` [PATCH v5 06/10] drm: bridge: dw-hdmi: Create PHY operations Laurent Pinchart
2017-03-03 17:20   ` Laurent Pinchart
2017-03-05 23:36   ` [PATCH v5.1 " Laurent Pinchart
2017-03-05 23:36     ` Laurent Pinchart
2017-03-03 17:20 ` [PATCH v5 07/10] drm: bridge: dw-hdmi: Add support for custom PHY configuration Laurent Pinchart
2017-03-03 17:20   ` Laurent Pinchart
2017-04-24  7:46   ` 郑阳
2017-04-26 11:04     ` Jose Abreu
2017-04-27  4:16       ` 郑阳
2017-03-03 17:20 ` [PATCH v5 08/10] drm: bridge: dw-hdmi: Remove device type from platform data Laurent Pinchart
2017-03-03 17:20   ` Laurent Pinchart
2017-03-03 17:20 ` [PATCH v5 09/10] drm: bridge: dw-hdmi: Switch to regmap for register access Laurent Pinchart
2017-03-03 17:20   ` Laurent Pinchart
2017-03-03 17:20 ` [PATCH v5 10/10] drm: bridge: dw-hdmi: Move the driver to a separate directory Laurent Pinchart
2017-03-03 17:20   ` Laurent Pinchart
2017-03-10 11:10 ` [PATCH v5 00/10] drm: bridge: dw-hdmi: Refactor PHY support Archit Taneja
2017-03-10 11:10   ` Archit Taneja

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170303172007.26541-1-laurent.pinchart+renesas@ideasonboard.com \
    --to=laurent.pinchart+renesas@ideasonboard.com \
    --cc=Jose.Abreu@synopsys.com \
    --cc=andy.yan@rock-chips.com \
    --cc=architt@codeaurora.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=fabio.estevam@freescale.com \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=narmstrong@baylibre.com \
    --cc=nickey.yang@rock-chips.com \
    --cc=rmk+kernel@arm.linux.org.uk \
    --cc=vladimir_zapolskiy@mentor.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.