From: Yakir Yang <ykk@rock-chips.com> To: Mark Yao <yzq@rock-chips.com>, Inki Dae <inki.dae@samsung.com>, Jingoo Han <jingoohan1@gmail.com>, Heiko Stuebner <heiko@sntech.de> Cc: "Javier Martinez Canillas" <javier@osg.samsung.com>, "Stéphane Marchesin" <marcheu@chromium.org>, "Sean Paul" <seanpaul@chromium.org>, "Tomasz Figa" <tfiga@chromium.org>, "David Airlie" <airlied@linux.ie>, daniel.vetter@ffwll.ch, "Thierry Reding" <treding@nvidia.com>, dianders@chromium.org, "Krzysztof Kozlowski" <k.kozlowski@samsung.com>, emil.l.velikov@gmail.com, "Dan Carpenter" <dan.carpenter@oracle.com>, "Yakir Yang" <ykk@rock-chips.com>, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, linux-rockchip@lists.infradead.org Subject: [PATCH v4 0/4] Add PSR function support for Analogix/Rockchip DP Date: Thu, 14 Jul 2016 12:15:04 +0800 [thread overview] Message-ID: <1468469704-12440-1-git-send-email-ykk@rock-chips.com> (raw) The full name of PSR is Panel Self Refresh, panel device could refresh itself with the hardware framebuffer in panel, this would make a lots of sense to save the power consumption. This v3 version have splited an common PSR driver for Rockchip, which is biggest changes from v2. This thread is based on Mark's RK3399 VOP thread[0] and my RK3399 eDP thread[1]. [0]: https://patchwork.kernel.org/patch/8886041/ [1]: https://patchwork.kernel.org/patch/9204497/ Changes in v4: - Avoid the weird behavior in rockchip_drm_wait_line_flag(). (Sean) - Make line_flag_num_x to an array. (Sean) - Remove the unused vop_cfg_done() in vop_line_flag_irq_enable(). (Stephane, reviewed in Google gerrit) [https://chromium-review.googlesource.com/#/c/349084/33/drivers/gpu/drm/rockchip/rockchip_drm_vop.c@466] - Tuck the global "psr_list" & "psr_list_mutex" in struct rockchip_drm_private. (Sean) - Move the access of "psr->state" under "psr->state_mutex"'s protect. (Sean) - Let "psr->state = PSR_FLUSH" under "psr->state_mutex"'s protect. (Sean) - Collect psr_enable() and psr_disable() into psr_set_state() - s/5\ second/PSR_FLUSH_TIMEOUT/ (Sean) - Flush the psr callback in vop_crtc_disable(). (Stéphane, reviewed in Google gerrit) [https://chromium-review.googlesource.com/#/c/349084/6/drivers/gpu/drm/rockchip/rockchip_drm_vop.c@475] - Add the missing file head with license. (Stéphane, reviewed in Google gerrit) [https://chromium-review.googlesource.com/#/c/357563/1/drivers/gpu/drm/rockchip/rockchip_drm_psr.h@3] - Downgrade the PSR version print message to debug level. (Sean) - Return 'void' instead of 'int' in analogix_dp_enable_sink_psr(). (Sean) - Delete the unused read dpcd operations in analogix_dp_enable_sink_psr(). (Sean) - Delete the arbitrary usleep_range in analogix_dp_enable_psr_crc. (Sean). - Clean up the hardcoded values in analogix_dp_send_psr_spd(). (Sean) - Rename "active/inactive" to "enable/disable". (Sean, Dominik) - Keep set the PSR_VID_CRC_FLUSH gate in analogix_dp_enable_psr_crc(). - Return 'void' instead of 'int' in analogix_dp_psr_set(). (Sean) - Pull the 10ms delay time out into a #define. (Sean) - Improved the code of analogix_dp_psr_work(). (Sean) - Indented with spaces for new numbers in rockchip_dp_device struct. (Stéphane, reviewed at Google gerrit) [https://chromium-review.googlesource.com/#/c/349085/33/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c@83] Changes in v3: - Export the 'rockchip_drm_wait_line_flag' symbol, and document it. - Add 'line_flag_num_0' for RK3288/RK3036 - Remove the notify for waiting line_flag event (Daniel) - split the psr flow into an common abstracted PSR driver - implement the 'fb->dirty' callback function (Daniel) - avoid to use notify to acqiure for vact event (Daniel) - remove psr_active() callback which introduce in v2 - split analogix_dp_enable_psr(), make it more clearly analogix_dp_detect_sink_psr() analogix_dp_enable_sink_psr() - remove some nosie register setting comments - split the common psr logic into a seperate driver, make this to a simple sub-psr device driver. Changes in v2: - Introduce in v2, split VOP line flag changes out - introduce in v2, splite the common Analogix DP changes out - remove vblank notify out (Daniel) - create a psr_active() callback in vop data struct. Yakir Yang (4): drm/rockchip: vop: export line flag function drm/rockchip: add an common abstracted PSR driver drm/bridge: analogix_dp: add the PSR function support drm/rockchip: analogix_dp: implement PSR function drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 60 ++++++ drivers/gpu/drm/bridge/analogix/analogix_dp_core.h | 4 + drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c | 49 +++++ drivers/gpu/drm/bridge/analogix/analogix_dp_reg.h | 28 +++ drivers/gpu/drm/rockchip/Makefile | 2 +- drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 57 ++++++ drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 4 + drivers/gpu/drm/rockchip/rockchip_drm_drv.h | 6 + drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 12 ++ drivers/gpu/drm/rockchip/rockchip_drm_psr.c | 223 +++++++++++++++++++++ drivers/gpu/drm/rockchip/rockchip_drm_psr.h | 26 +++ drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 147 ++++++++++++++ drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 2 + drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 4 + include/drm/bridge/analogix_dp.h | 3 + 15 files changed, 626 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/drm/rockchip/rockchip_drm_psr.c create mode 100644 drivers/gpu/drm/rockchip/rockchip_drm_psr.h -- 1.9.1
WARNING: multiple messages have this Message-ID (diff)
From: Yakir Yang <ykk@rock-chips.com> To: Mark Yao <yzq@rock-chips.com>, Inki Dae <inki.dae@samsung.com>, Jingoo Han <jingoohan1@gmail.com>, Heiko Stuebner <heiko@sntech.de> Cc: "Krzysztof Kozlowski" <k.kozlowski@samsung.com>, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, daniel.vetter@ffwll.ch, emil.l.velikov@gmail.com, dianders@chromium.org, dri-devel@lists.freedesktop.org, "Tomasz Figa" <tfiga@chromium.org>, "Javier Martinez Canillas" <javier@osg.samsung.com>, "Stéphane Marchesin" <marcheu@chromium.org>, "Thierry Reding" <treding@nvidia.com>, "Dan Carpenter" <dan.carpenter@oracle.com> Subject: [PATCH v4 0/4] Add PSR function support for Analogix/Rockchip DP Date: Thu, 14 Jul 2016 12:15:04 +0800 [thread overview] Message-ID: <1468469704-12440-1-git-send-email-ykk@rock-chips.com> (raw) The full name of PSR is Panel Self Refresh, panel device could refresh itself with the hardware framebuffer in panel, this would make a lots of sense to save the power consumption. This v3 version have splited an common PSR driver for Rockchip, which is biggest changes from v2. This thread is based on Mark's RK3399 VOP thread[0] and my RK3399 eDP thread[1]. [0]: https://patchwork.kernel.org/patch/8886041/ [1]: https://patchwork.kernel.org/patch/9204497/ Changes in v4: - Avoid the weird behavior in rockchip_drm_wait_line_flag(). (Sean) - Make line_flag_num_x to an array. (Sean) - Remove the unused vop_cfg_done() in vop_line_flag_irq_enable(). (Stephane, reviewed in Google gerrit) [https://chromium-review.googlesource.com/#/c/349084/33/drivers/gpu/drm/rockchip/rockchip_drm_vop.c@466] - Tuck the global "psr_list" & "psr_list_mutex" in struct rockchip_drm_private. (Sean) - Move the access of "psr->state" under "psr->state_mutex"'s protect. (Sean) - Let "psr->state = PSR_FLUSH" under "psr->state_mutex"'s protect. (Sean) - Collect psr_enable() and psr_disable() into psr_set_state() - s/5\ second/PSR_FLUSH_TIMEOUT/ (Sean) - Flush the psr callback in vop_crtc_disable(). (Stéphane, reviewed in Google gerrit) [https://chromium-review.googlesource.com/#/c/349084/6/drivers/gpu/drm/rockchip/rockchip_drm_vop.c@475] - Add the missing file head with license. (Stéphane, reviewed in Google gerrit) [https://chromium-review.googlesource.com/#/c/357563/1/drivers/gpu/drm/rockchip/rockchip_drm_psr.h@3] - Downgrade the PSR version print message to debug level. (Sean) - Return 'void' instead of 'int' in analogix_dp_enable_sink_psr(). (Sean) - Delete the unused read dpcd operations in analogix_dp_enable_sink_psr(). (Sean) - Delete the arbitrary usleep_range in analogix_dp_enable_psr_crc. (Sean). - Clean up the hardcoded values in analogix_dp_send_psr_spd(). (Sean) - Rename "active/inactive" to "enable/disable". (Sean, Dominik) - Keep set the PSR_VID_CRC_FLUSH gate in analogix_dp_enable_psr_crc(). - Return 'void' instead of 'int' in analogix_dp_psr_set(). (Sean) - Pull the 10ms delay time out into a #define. (Sean) - Improved the code of analogix_dp_psr_work(). (Sean) - Indented with spaces for new numbers in rockchip_dp_device struct. (Stéphane, reviewed at Google gerrit) [https://chromium-review.googlesource.com/#/c/349085/33/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c@83] Changes in v3: - Export the 'rockchip_drm_wait_line_flag' symbol, and document it. - Add 'line_flag_num_0' for RK3288/RK3036 - Remove the notify for waiting line_flag event (Daniel) - split the psr flow into an common abstracted PSR driver - implement the 'fb->dirty' callback function (Daniel) - avoid to use notify to acqiure for vact event (Daniel) - remove psr_active() callback which introduce in v2 - split analogix_dp_enable_psr(), make it more clearly analogix_dp_detect_sink_psr() analogix_dp_enable_sink_psr() - remove some nosie register setting comments - split the common psr logic into a seperate driver, make this to a simple sub-psr device driver. Changes in v2: - Introduce in v2, split VOP line flag changes out - introduce in v2, splite the common Analogix DP changes out - remove vblank notify out (Daniel) - create a psr_active() callback in vop data struct. Yakir Yang (4): drm/rockchip: vop: export line flag function drm/rockchip: add an common abstracted PSR driver drm/bridge: analogix_dp: add the PSR function support drm/rockchip: analogix_dp: implement PSR function drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 60 ++++++ drivers/gpu/drm/bridge/analogix/analogix_dp_core.h | 4 + drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c | 49 +++++ drivers/gpu/drm/bridge/analogix/analogix_dp_reg.h | 28 +++ drivers/gpu/drm/rockchip/Makefile | 2 +- drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 57 ++++++ drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 4 + drivers/gpu/drm/rockchip/rockchip_drm_drv.h | 6 + drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 12 ++ drivers/gpu/drm/rockchip/rockchip_drm_psr.c | 223 +++++++++++++++++++++ drivers/gpu/drm/rockchip/rockchip_drm_psr.h | 26 +++ drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 147 ++++++++++++++ drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 2 + drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 4 + include/drm/bridge/analogix_dp.h | 3 + 15 files changed, 626 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/drm/rockchip/rockchip_drm_psr.c create mode 100644 drivers/gpu/drm/rockchip/rockchip_drm_psr.h -- 1.9.1 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
next reply other threads:[~2016-07-14 4:15 UTC|newest] Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-07-14 4:15 Yakir Yang [this message] 2016-07-14 4:15 ` [PATCH v4 0/4] Add PSR function support for Analogix/Rockchip DP Yakir Yang 2016-07-14 4:15 ` [PATCH v4 1/4] drm/rockchip: vop: export line flag function Yakir Yang 2016-07-14 14:46 ` Sean Paul 2016-07-15 1:43 ` Yakir Yang 2016-07-15 1:43 ` Yakir Yang 2016-07-14 4:15 ` [PATCH v4 2/4] drm/rockchip: add an common abstracted PSR driver Yakir Yang 2016-07-14 4:15 ` Yakir Yang 2016-07-14 15:14 ` Sean Paul 2016-07-15 1:43 ` Yakir Yang 2016-07-24 7:14 ` Yakir Yang 2016-07-23 4:04 ` Doug Anderson 2016-07-24 7:08 ` Yakir Yang 2016-07-14 4:15 ` [PATCH v4 3/4] drm/bridge: analogix_dp: add the PSR function support Yakir Yang 2016-07-14 4:15 ` Yakir Yang 2016-07-14 15:23 ` Sean Paul 2016-07-14 15:23 ` Sean Paul 2016-07-15 9:32 ` Yakir Yang 2016-07-15 10:47 ` Yakir Yang 2016-07-14 4:15 ` [PATCH v4 4/4] drm/rockchip: analogix_dp: implement PSR function Yakir Yang 2016-07-14 4:15 ` Yakir Yang 2016-07-14 15:26 ` Sean Paul 2016-07-14 15:26 ` Sean Paul 2016-07-15 5:45 ` Yakir Yang 2016-07-15 5:45 ` Yakir Yang 2016-07-15 10:55 ` [PATCH v4.1 1/4] drm/rockchip: vop: export line flag function Yakir Yang 2016-07-15 13:04 ` Sean Paul 2016-07-15 13:04 ` Sean Paul 2016-07-16 2:30 ` Yakir Yang 2016-07-15 10:55 ` [PATCH v4.1 3/4] drm/bridge: analogix_dp: add the PSR function support Yakir Yang 2016-07-15 10:55 ` Yakir Yang 2016-07-15 13:13 ` Sean Paul 2016-07-15 13:13 ` Sean Paul 2016-07-16 2:31 ` Yakir Yang 2016-07-16 2:31 ` Yakir Yang
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=1468469704-12440-1-git-send-email-ykk@rock-chips.com \ --to=ykk@rock-chips.com \ --cc=airlied@linux.ie \ --cc=dan.carpenter@oracle.com \ --cc=daniel.vetter@ffwll.ch \ --cc=dianders@chromium.org \ --cc=dri-devel@lists.freedesktop.org \ --cc=emil.l.velikov@gmail.com \ --cc=heiko@sntech.de \ --cc=inki.dae@samsung.com \ --cc=javier@osg.samsung.com \ --cc=jingoohan1@gmail.com \ --cc=k.kozlowski@samsung.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-rockchip@lists.infradead.org \ --cc=linux-samsung-soc@vger.kernel.org \ --cc=marcheu@chromium.org \ --cc=seanpaul@chromium.org \ --cc=tfiga@chromium.org \ --cc=treding@nvidia.com \ --cc=yzq@rock-chips.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: linkBe 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.