All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv3 0/8] devfreq: Add generic exynos memory-bus frequency driver
@ 2015-01-08  1:40 ` Chanwoo Choi
  0 siblings, 0 replies; 52+ messages in thread
From: Chanwoo Choi @ 2015-01-08  1:40 UTC (permalink / raw)
  To: myungjoo.ham, kgene
  Cc: kyungmin.park, rafael.j.wysocki, mark.rutland, a.kesavan,
	tomasz.figa, k.kozlowski, b.zolnierkie, robh+dt, cw00.choi,
	inki.dae, linux-pm, linux-kernel, linux-arm-kernel,
	linux-samsung-soc

This patch-set adds the generic exynos bus frequency driver for memory bus
with DEVFREQ framework. The Samsung Exynos SoCs have the common architecture
for memory bus between DRAM memory and MMC/sub IP in SoC. This driver can
support the memory bus frequency driver for Exynos SoCs.

Each memory bus block has a clock for memory bus speed and frequency
table which is changed according to the utilization of memory bus on runtime.
And then each memory bus group has the one more memory bus blocks and
OPP table (including frequency and voltage), regulator, devfreq-event
devices.

There are a little difference about the number of memory bus because each Exynos
SoC have the different sub-IP and different memory bus speed. In spite of this
difference among Exynos SoCs, we can support almost Exynos SoC by adding
unique data of memory bus to devicetree file.

Depend on:
- v3.19-rc3
- [PATCHv7 00/10] devfreq: Add devfreq-event class to provide raw data for devfreq device
  : https://lkml.org/lkml/2015/1/7/795

Changelog:

Changes from v2:
(https://lkml.org/lkml/2014/12/31/2)
- Support the memory bus frequency feature for Exynos3250-based Monk board
- Fix build warning about variable uninitialized

Changes from v1:
(https://lkml.org/lkml/2014/12/23/178)
- This patchset is rebased on v3.19-rc2.
- Fix bug after wake-up from suspend state. If devfreq device fail to get event,
  exynos-busfreq retry to set the event for starting.
- Add memory bus group of Exynos4x12/Exynos4210
- Add divider clock id for Exynos4 memory bus frequency
- Support memory bus frequency driver on Exynos4412-based TRATS2 board
- This patch-set has the dependency on following patch-set[1]:
  [1] [PATCHv6 0/9] devfreq: Add devfreq-event class to provide raw data for devfreq device
  : https://lkml.org/lkml/2014/12/28/139

Chanwoo Choi (8):
  devfreq: exynos: Add generic exynos memory bus frequency driver
  devfreq: exynos: Add documentation for generic exynos memory bus frequency driver
  ARM: dts: Add memory bus node for Exynos3250
  clk: samsung: exynos4: Add divider clock id for memory bus frequency
  ARM: dts: Add memory bus node for Exynos4x12
  ARM: dts: Add memory bus node for Exynos4210
  ARM: dts: Add memory bus node for Exynos3250-based Rinato/Monk board
  ARM: dts: Add memory bus node for Exynos4412-based TRATS2 board

 .../devicetree/bindings/devfreq/exynos-busfreq.txt | 184 +++++++
 arch/arm/boot/dts/exynos3250-monk.dts              |  12 +
 arch/arm/boot/dts/exynos3250-rinato.dts            |  12 +
 arch/arm/boot/dts/exynos3250.dtsi                  | 125 +++++
 arch/arm/boot/dts/exynos4210.dtsi                  |  93 ++++
 arch/arm/boot/dts/exynos4412-trats2.dts            |  12 +
 arch/arm/boot/dts/exynos4x12.dtsi                  | 121 +++++
 drivers/clk/samsung/clk-exynos4.c                  |  10 +-
 drivers/devfreq/Kconfig                            |  15 +
 drivers/devfreq/Makefile                           |   1 +
 drivers/devfreq/exynos-busfreq.c                   | 589 +++++++++++++++++++++
 include/dt-bindings/clock/exynos4.h                |   7 +-
 12 files changed, 1175 insertions(+), 6 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/devfreq/exynos-busfreq.txt
 create mode 100644 drivers/devfreq/exynos-busfreq.c

-- 
1.8.5.5


^ permalink raw reply	[flat|nested] 52+ messages in thread
* Re: Re: [PATCHv3 0/8] devfreq: Add generic exynos memory-bus frequency driver
@ 2015-02-24  1:23 MyungJoo Ham
  2015-02-24 12:22 ` Tobias Jakobi
  0 siblings, 1 reply; 52+ messages in thread
From: MyungJoo Ham @ 2015-02-24  1:23 UTC (permalink / raw)
  To: Tobias Jakobi, 최찬우, Tobias Jakobi
  Cc: kgene@kernel.org, 박경민,
	rafael.j.wysocki@intel.com, mark.rutland@arm.com,
	ABHILASH KESAVAN, tomasz.figa@gmail.com, Krzysztof Kozlowski,
	Bartlomiej Zolnierkiewicz, robh+dt@kernel.org,
	대인기, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org

> Hello Chanwoo!
> 
> Chanwoo Choi wrote:
> > As you thought, when maintaining lower clock of memory bus frequency,
> > some issue related to multimedia feature will happen.
> > 
> > Separately, We have to check the miminum lower clock for working of multimedia feature.
> > and then multimedia or other IP have to request it to DVFS driver (memory busfreq driver).
> > But, latest mainline kernel currently has not some way to inform minimum clock to DVFS driver.
> > 
> > So, If you check the miminum clock for hdmi, I'll use this clock as minumu frequency of dvfs table.
> > 
> > Thanks,
> > Chanwoo Choi
> > 
> 
> First I have to apologize. I didn't check carefully. Actually it's not
> the HDMI subsystem which seems to hang during my test, but the G2D
> subsystem.
> 
> Here's a snippet of the kernel log with drm.debug=0xff:
> [ 1157.911264] [drm:drm_framebuffer_reference] ee144e00: FB ID: 27 (2)
> [ 1157.911271] [drm:drm_framebuffer_unreference] ee37fb80: FB ID: 25 (2)
> [ 1157.911277] [drm:drm_framebuffer_unreference] ee144e00: FB ID: 27 (3)
> [ 1157.911315] [drm:drm_ioctl] pid=2569, dev=0xe200, auth=1,
> EXYNOS_G2D_GET_VER
> [ 1158.434439] [drm:drm_ioctl] pid=2569, dev=0xe200, auth=1,
> EXYNOS_G2D_SET_CMDLIST
> [ 1158.434536] [drm:drm_ioctl] pid=2569, dev=0xe200, auth=1, EXYNOS_G2D_EXEC
> [ 1158.437484] [drm:drm_vm_close_locked] 0xaf840000,0x00140000
> [ 1158.437507] [drm:drm_ioctl] pid=2569, dev=0xe200, auth=1,
> DRM_IOCTL_GEM_CLOSE
> [ 1158.437524] [drm:exynos_drm_gem_destroy] handle count = 0
> [ 1158.437532] [drm:lowlevel_buffer_deallocate] dma_addr(0x20500000),
> size(0x140000)
> [ 1158.437810] [drm:drm_ioctl] pid=2569, dev=0xe200, auth=1,
> EXYNOS_GEM_CREATE
> [ 1158.437819] [drm:exynos_drm_init_buf] desired size = 0x256000
> [ 1158.437851] [drm:exynos_drm_gem_init] created file object = 0xe97c8d00
> [ 1158.445506] [drm:lowlevel_buffer_allocate] dma_addr(0x21400000),
> size(0x256000)
> [ 1158.445535] [drm:exynos_drm_gem_handle_create] gem handle = 0x1
> [ 1158.445556] [drm:drm_ioctl] pid=2569, dev=0xe200, auth=1,
> DRM_IOCTL_MODE_MAP_DUMB
> [ 1158.445570] [drm:exynos_drm_gem_dumb_map_offset] offset = 0x101c2000
> [ 1158.445600] [drm:drm_vm_open_locked] 0xaec15000,0x00256000
> [ 1158.445608] [drm:update_vm_cache_attr] flags = 0x0
> [ 1158.457696] [drm:drm_ioctl] pid=2569, dev=0xe200, auth=1,
> EXYNOS_G2D_SET_CMDLIST
> [ 1158.457745] [drm:drm_ioctl] pid=2569, dev=0xe200, auth=1, EXYNOS_G2D_EXEC
> 
> 
> So G2D_EXEC seems to work once, but the second time it hangs forever. I
> even fail at attaching gdb to the application then (gdb then also hangs
> in D state).
> 
> If I just use the 'vsynced page flipping' test, then everything works:
> ./modetest -M exynos -s 16@13:1280x720 -v
> setting mode 1280x720-60Hz@XR24 on connectors 16, crtc 13
> freq: 61.08Hz
> freq: 60.00Hz
> freq: 60.00Hz
> <etc.>
> 
> I'm going to do some tests with the G2D in the next time, checking how
> much I can lower MIF/INT clocks before the engine becomes unstable.
> 
> With best wishes,
> Tobias
> 
> 

Unless you are willing to wait for 2 minutes after the kernal hangs,
you may want to adjust "DEFAULT_HUNG_TASK_TIMEOUT" to shorter value
(120 --> 5 for 5 seconds). It seems that you've cut it off in the middle
of that "120 sec" wait.

If it's in D state (in kernel), gdb won't work as you are experiencing.
Sorry for not testing with HDMI; my Exynos devices do not have HDMI. :)

To Chanwoo, wouldn't it be ok to have the corresponding devfreq driver
to set minimum higher IFF HDMI is enabled? (either by build time or
run time) I guess Exynos HDMI driver should express PM-QoS requests later.
(Or let Exynos HDMI driver not hung even if its memory transactions are
not fast enough)

Cheers,
MyungJoo

^ permalink raw reply	[flat|nested] 52+ messages in thread

end of thread, other threads:[~2015-02-24 12:22 UTC | newest]

Thread overview: 52+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-08  1:40 [PATCHv3 0/8] devfreq: Add generic exynos memory-bus frequency driver Chanwoo Choi
2015-01-08  1:40 ` Chanwoo Choi
2015-01-08  1:40 ` [PATCHv3 1/8] devfreq: exynos: Add generic exynos memory bus " Chanwoo Choi
2015-01-08  1:40   ` Chanwoo Choi
2015-01-08  1:40 ` [PATCHv3 2/8] devfreq: exynos: Add documentation for " Chanwoo Choi
2015-01-08  1:40   ` Chanwoo Choi
2015-01-08 21:18   ` Rob Herring
2015-01-08 21:18     ` Rob Herring
2015-01-09  2:42     ` Chanwoo Choi
2015-01-09  2:42       ` Chanwoo Choi
2015-01-20  7:19     ` Viresh Kumar
2015-01-20  7:19       ` Viresh Kumar
2015-01-20  8:23       ` Chanwoo Choi
2015-01-20  8:23         ` Chanwoo Choi
2015-01-20 11:22         ` Viresh Kumar
2015-01-20 11:22           ` Viresh Kumar
2015-01-20 11:37           ` Chanwoo Choi
2015-01-20 11:37             ` Chanwoo Choi
2015-01-21  3:17             ` Viresh Kumar
2015-01-21  3:17               ` Viresh Kumar
2015-01-21  4:20               ` Chanwoo Choi
2015-01-21  4:20                 ` Chanwoo Choi
2015-01-21  4:37                 ` Viresh Kumar
2015-01-21  4:37                   ` Viresh Kumar
2015-01-21  6:12                   ` Chanwoo Choi
2015-01-21  6:12                     ` Chanwoo Choi
2015-01-21  6:32                     ` Viresh Kumar
2015-01-21  6:32                       ` Viresh Kumar
2015-01-08  1:40 ` [PATCHv3 3/8] ARM: dts: Add memory bus node for Exynos3250 Chanwoo Choi
2015-01-08  1:40   ` Chanwoo Choi
2015-01-08  1:40   ` Chanwoo Choi
2015-01-08  1:40 ` [PATCHv3 4/8] clk: samsung: exynos4: Add divider clock id for memory bus frequency Chanwoo Choi
2015-01-08  1:40   ` Chanwoo Choi
2015-01-08  1:40 ` [PATCHv3 5/8] ARM: dts: Add memory bus node for Exynos4x12 Chanwoo Choi
2015-01-08  1:40   ` Chanwoo Choi
2015-01-08  1:40 ` [PATCHv3 6/8] ARM: dts: Add memory bus node for Exynos4210 Chanwoo Choi
2015-01-08  1:40   ` Chanwoo Choi
2015-01-08  1:40 ` [PATCHv3 7/8] ARM: dts: Add memory bus node for Exynos3250-based Rinato/Monk board Chanwoo Choi
2015-01-08  1:40   ` Chanwoo Choi
2015-01-08  1:40 ` [PATCHv3 8/8] ARM: dts: Add memory bus node for Exynos4412-based TRATS2 board Chanwoo Choi
2015-01-08  1:40   ` Chanwoo Choi
2015-02-15  0:25 ` [PATCHv3 0/8] devfreq: Add generic exynos memory-bus frequency driver Tobias Jakobi
2015-02-15  0:25   ` Tobias Jakobi
2015-02-18 20:59   ` Tobias Jakobi
2015-02-18 20:59     ` Tobias Jakobi
2015-02-22 23:44     ` Chanwoo Choi
2015-02-22 23:44       ` Chanwoo Choi
2015-02-23 19:57       ` Tobias Jakobi
2015-02-23 19:57         ` Tobias Jakobi
2015-02-23 23:55         ` Chanwoo Choi
2015-02-23 23:55           ` Chanwoo Choi
  -- strict thread matches above, loose matches on Subject: below --
2015-02-24  1:23 MyungJoo Ham
2015-02-24 12:22 ` Tobias Jakobi

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.