History log of /linux-master/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
Revision Date Author Comments
# 1c831ade 03-Sep-2020 Robin Murphy <robin.murphy@arm.com>

drm/komeda: Drop local dma_parms

Since commit 9495b7e92f71 ("driver core: platform: Initialize dma_parms
for platform devices"), struct platform_device already provides a
dma_parms structure, so we can save allocating another one.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Reviewed-by: James Qian Wang <james.qian.wang@arm.com>
[replaced DMA_BIT_MASK(32) with U32_MAX]
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/8de297b5b916628c77b99068fb5aac1a69eed6f5.1599164796.git.robin.murphy@arm.com


# 8f902dbd 12-Dec-2019 james qian wang (Arm Technology China) <james.qian.wang@arm.com>

drm/komeda: Add event handling for EMPTY/FULL

EMPTY/FULL are HW input/output FIFO condition identifer, which are
useful information for addressing the problem, so expose them.

Signed-off-by: james qian wang (Arm Technology China) <james.qian.wang@arm.com>
Reviewed-by: Mihail Atanassov <mihail.atanassov@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191212072737.30116-1-james.qian.wang@arm.com


# b25bc78f 10-Dec-2019 james qian wang (Arm Technology China) <james.qian.wang@arm.com>

drm/komeda: Update the chip identify

1. Drop komeda-CORE product id comparison and put it into the d71_identify
2. Update pipeline node DT-binding:
(a). Skip the needless pipeline DT node.
(b). Return fail if the essential pipeline DT node is missing.

With these changes, for chips in same family no need to change the DT.

v2: Rebase
v3: Address Mihail's comments.

Signed-off-by: james qian wang (Arm Technology China) <james.qian.wang@arm.com>
Reviewed-by: Mihail Atanassov <mihail.atanassov@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191210084828.19664-2-james.qian.wang@arm.com


# 6958aa90 12-Nov-2019 james qian wang (Arm Technology China) <james.qian.wang@arm.com>

drm/komeda: Fix komeda driver build error

Fix the build errors lead by

'commit 4039f0293bbd ("drm/komeda: Add option to print WARN- and INFO-level IRQ events")'

Signed-off-by: james qian wang (Arm Technology China) <james.qian.wang@arm.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20191113013114.3013-1-james.qian.wang@arm.com


# f8fbe33b 07-Nov-2019 Mihail Atanassov <Mihail.Atanassov@arm.com>

drm/komeda: add rate limiting disable to err_verbosity

It's possible to get multiple events in a single frame/flip, so add an
option to print them all.

Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
Signed-off-by: Mihail Atanassov <mihail.atanassov@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191107114155.54307-6-mihail.atanassov@arm.com


# 4039f029 07-Nov-2019 Mihail Atanassov <Mihail.Atanassov@arm.com>

drm/komeda: Add option to print WARN- and INFO-level IRQ events

Extra detail (normally off) almost never hurts.

Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
Signed-off-by: Mihail Atanassov <mihail.atanassov@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191107114155.54307-5-mihail.atanassov@arm.com


# 39338934 07-Nov-2019 Mihail Atanassov <Mihail.Atanassov@arm.com>

drm/komeda: Optionally dump DRM state on interrupts

It's potentially useful information when diagnosing error/warn IRQs, so
dump it to dmesg with a drm_info_printer. Hide this extra debug dumping
behind another komeda_dev->err_verbosity bit.

Note that there's not much sense in dumping it for INFO events,
since the VSYNC event will swamp the log.

Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
Signed-off-by: Mihail Atanassov <mihail.atanassov@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191107114155.54307-4-mihail.atanassov@arm.com


# 9a673215 07-Nov-2019 Mihail Atanassov <Mihail.Atanassov@arm.com>

drm/komeda: Remove CONFIG_KOMEDA_ERROR_PRINT

Now that there's a debugfs node to control the same, remove the
config option.

Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
Signed-off-by: Mihail Atanassov <mihail.atanassov@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191107114155.54307-3-mihail.atanassov@arm.com


# 8894cd58 07-Nov-2019 Mihail Atanassov <Mihail.Atanassov@arm.com>

drm/komeda: Add debugfs node to control error verbosity

Named 'err_verbosity', currently with only 1 active bit in that
replicates the existing level - print error events once per flip.

Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
Signed-off-by: Mihail Atanassov <mihail.atanassov@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191107114155.54307-2-mihail.atanassov@arm.com


# 2ebb6701 22-Sep-2019 Lowry Li (Arm Technology China) <Lowry.Li@arm.com>

drm/komeda: Adds power management support

Adds system power management support in KMS kernel driver.

Depends on:
https://patchwork.freedesktop.org/series/62377/

Changes since v1:
Since we have unified mclk/pclk/pipeline->aclk to one mclk, which will
be turned on/off when crtc atomic enable/disable, removed runtime power
management.
Removes run time get/put related flow.
Adds to disable the aclk when register access finished.

Changes since v2:
Rebases to the drm-misc-next branch.

Signed-off-by: Lowry Li (Arm Technology China) <lowry.li@arm.com>
Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Signed-off-by: james qian wang (Arm Technology China) <james.qian.wang@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190923015908.26627-1-lowry.li@arm.com


# 32b339d9 17-Sep-2019 Mihail Atanassov <Mihail.Atanassov@arm.com>

drm/komeda: Remove in-code use of ifdef

Provide a dummy static inline function in the header instead.

Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Lowry Li (Arm Technology China) <Lowry.Li@arm.com>
Cc: james qian wang (Arm Technology China) <james.qian.wang@arm.com>
Fixes: 4d74b25ee395 ("drm/komeda: Adds error event print functionality")
Signed-off-by: Mihail Atanassov <mihail.atanassov@arm.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Signed-off-by: james qian wang (Arm Technology China) <james.qian.wang@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190917150314.20892-1-mihail.atanassov@arm.com


# 4d74b25e 02-Aug-2019 Lowry Li (Arm Technology China) <Lowry.Li@arm.com>

drm/komeda: Adds error event print functionality

Adds to print the event message when error happens and the same event
will not be printed until next vsync.

Changes since v2:
1. Refine komeda_sprintf();
2. Not using STR_SZ macro for the string size in komeda_print_events().

Changes since v1:
1. Handling the event print by CONFIG_KOMEDA_ERROR_PRINT;
2. Changing the max string size to 256.

Signed-off-by: Lowry Li (Arm Technology China) <lowry.li@arm.com>
Reviewed-by: Mihail Atanassov <mihail.atanassov@arm.com>
Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Signed-off-by: james qian wang (Arm Technology China) <james.qian.wang@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1564738954-6101-1-git-send-email-lowry.li@arm.com


# 6f84da0c 05-Jun-2019 james qian wang (Arm Technology China) <james.qian.wang@arm.com>

drm/komeda: Rename main engine clk name "mclk" to "aclk"

To avoid confusion, unify the driver main engine clk name "mclk" to
the spec name "aclk".

Signed-off-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>


# 28be315c 05-Jun-2019 james qian wang (Arm Technology China) <james.qian.wang@arm.com>

drm/komeda: Unify mclk/pclk/pipeline->aclk to one MCLK

Current komeda driver uses three dedicated clks for a specific purpose:
- mclk: main engine clock
- pclk: APB clock
- pipeline->aclk: AXI clock.

But per spec the komeda HW only has three input clks:
- ACLK: used for AXI masters, APB slave and most pipeline processing
- PXCLK for pipeline 0: output pixel clock for pipeline 0
- PXCLK for pipeline 1: output pixel clock for pipeline 1

So one ACLK is enough, no need to split it to three mclk/pclk/axiclk.
drop pclk/pipeline->axiclk. but only keep one mclk in komeda driver.

Signed-off-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>


# e87cae37 06-Jun-2019 Lowry Li (Arm Technology China) <Lowry.Li@arm.com>

drm/komeda: Adds SMMU support

Adds iommu_connect and disconnect for SMMU support, and configures
TBU translation once SMMU has been attached to the display device.

Signed-off-by: Lowry Li (Arm Technology China) <lowry.li@arm.com>
[fixed checking of error code returned by dp_wait_cond() and removed
extraneous DRM_ERROR() calls]
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>


# a260e0b8 11-Apr-2019 Lowry Li (Arm Technology China) <Lowry.Li@arm.com>

drm/komeda: fixing of DMA mapping sg segment warning

Fixing the DMA mapping sg segment warning, which shows "DMA-API: mapping
sg segment longer than device claims to support [len=921600] [max=65536]".
Fixed by setting the max segment size at Komeda driver.

This patch depends on:
- https://patchwork.freedesktop.org/series/54448/
- https://patchwork.freedesktop.org/series/54449/
- https://patchwork.freedesktop.org/series/54450/
- https://patchwork.freedesktop.org/series/58976/

Changes since v1:
- Adds member description
- Adds patch denpendency in the comment

Signed-off-by: Lowry Li (Arm Technology China) <lowry.li@arm.com>
Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Reviewed-by: Ayan Kumar Halder <ayan.halder@arm.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>


# ba1b9f8c 25-Apr-2019 james qian wang (Arm Technology China) <james.qian.wang@arm.com>

drm/komeda: Constify the usage of komeda_component/pipeline/dev_funcs

Depends on:
- https://patchwork.freedesktop.org/series/58976/
- https://patchwork.freedesktop.org/series/59855/

Reported-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>


# 8c919745 23-Apr-2019 james qian wang (Arm Technology China) <james.qian.wang@arm.com>

drm/komeda: Fixed warning: Function parameter or member not described

Fixed the warnings: Function parameter or member 'xxx' not described
when make htmldocs

This patch depends on:
- https://patchwork.freedesktop.org/series/54448/
- https://patchwork.freedesktop.org/series/54449/
- https://patchwork.freedesktop.org/series/54450/

v2: Rebase and add reporter

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>


# 55223394 22-Jan-2019 james qian wang (Arm Technology China) <james.qian.wang@arm.com>

drm/komeda: Add sysfs attribute: core_id and config_id

Add two sysfs node: core_id, config_id, user can read them to fetch the
HW product information.

Also, use memset to initialize config_id, rather than quirky C syntax.
Courtesy of Nathan Chancellor <natechancellor@gmail.com>.

Signed-off-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
[Merged Nathan's patch that uses memset to initialize config_id into
original patch as the fixes tag changed due to rebase, reworded the
commit to reference the merged patch]
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>


# 98fe3f93 22-Jan-2019 james qian wang (Arm Technology China) <james.qian.wang@arm.com>

drm/komeda: Add komeda_crtc_vblank_enable/disable

Add a new komeda_dev_func->on_off_vblank to enable/disable HW vblank event

Signed-off-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>


# 20d84aa8 22-Jan-2019 james qian wang (Arm Technology China) <james.qian.wang@arm.com>

drm/komeda: Add komeda_crtc_prepare/unprepare

These two function will be used by komeda_crtc_enable/disable to do some
prepartion works when enable/disable a crtc. like enable a crtc:
1. Adjust display operation mode.
2. Enable/prepare needed clk.

v2: Rebase

Signed-off-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>


# 59dd6d58 22-Jan-2019 james qian wang (Arm Technology China) <james.qian.wang@arm.com>

drm/komeda: Add komeda_crtc_atomic_flush

A komeda flush is comprised two steps:
1. update pipeline/component state to HW.
2. call dev_func->flush to notify HW to kickoff the update.

Signed-off-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>


# 7d3cfb70 22-Jan-2019 james qian wang (Arm Technology China) <james.qian.wang@arm.com>

drm/komeda: Add debugfs node "register" for register dump

Add a debugfs node "register" and entry function dump_register to
dev/pipeline/component to register dump, then user can read
"/sys/kernel/debug/komeda/register" to get the register values via these
chip function.

Signed-off-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
[Added the d71_layer_dump() function that was in a previous commit]
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>


# 0dac37bf 22-Jan-2019 james qian wang (Arm Technology China) <james.qian.wang@arm.com>

drm/komeda: Add irq handling

1. Added irq_handler/irq_enable/irq_disable to komeda_dev_func, then the
Komeda-CORE can control the HW irq via these chip function.
2. Install irq and register irq_handler to system by DRM, so once the IRQ
coming, the handling sequence is:

komeda_kms_irq_handler(int irq, void *data)
/* step 1. call into the CHIP to recognize event */
mdev->funcs->irq_handler(mdev, &evts);

/* step 2. notify the crtc to handle the events */
for (i = 0; i < kms->n_crtcs; i++)
komeda_crtc_handle_event(&kms->crtcs[i], &evts);

v2:
- Move get IRQ number into this change.
- Enable irq before drm_dev_register.

Signed-off-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>


# 874cf192 15-Jan-2019 Liviu Dudau <Liviu.Dudau@arm.com>

drm: arm/komeda: Remove IRQ parsing from initial series

The initial series is only introducing the basic components and not
implementing IRQ handling. Remove the left over code that touches
IRQs until the proper implementation is introduced in a later series.

Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>


# 981d29d2 03-Jan-2019 james qian wang (Arm Technology China) <james.qian.wang@arm.com>

drm/komeda: Add komeda_format_caps for format handling

komeda_format_caps is for describing ARM display specific features and
limitations of a specific format, and format_caps will be linked into
&komeda_framebuffer like a extension of &drm_format_info.
And komed_format_caps_table will be initialized before the enum_resources,
since the layer features description depend on this format_caps table, so
we'd better initialize the table first.

Changes in v4:
- Rebase.

Changes in v3:
- Fixed style problem found by checkpatch.pl --strict.

Signed-off-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>


# 29e56aec 03-Jan-2019 james qian wang (Arm Technology China) <james.qian.wang@arm.com>

drm/komeda: Add DT parsing

Parse DT and initialize corresponding dev/pipeline attributes.

Changes in v4:
- Rebase.

Changes in v3:
- Fixed style problem found by checkpatch.pl --strict.

Changes in v2:
- Unified abbreviation of "pipeline" to "pipe".

Signed-off-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>


# 26bd43a7 03-Jan-2019 james qian wang (Arm Technology China) <james.qian.wang@arm.com>

drm/komeda: Build komeda to be a platform module

Implement a simple wrapper for platform module to build komeda to module,
Also add a very simple D71 layer code to show how to discover a product.
Komeda driver direct bind the product ENTRY function xxx_identity to DT
compatible name like:

d71_product = {
.product_id = MALIDP_D71_PRODUCT_ID,
.identify = d71_identify,
},

const struct of_device_id komeda_of_match[] = {
{ .compatible = "arm,mali-d71", .data = &d71_product, },
{},
};

Then when linux found a matched DT node and call driver to probe, we can
easily get the of data, and call into the product to do the identify:

komeda_bind()
{
...
product = of_device_get_match_data(dev);

product->identify();
...
}

Changes in v4:
- Replaced kzalloc with devm_kzalloc

Changes in v3:
- Fixed style problem found by checkpatch.pl --strict.

Signed-off-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>


# bd628c1b 03-Jan-2019 james qian wang (Arm Technology China) <james.qian.wang@arm.com>

drm/komeda: komeda_dev/pipeline/component definition and initialzation

1. Added a brief definition of komeda_dev/pipeline/component, this change
didn't add the detailed component features and capabilities, which will
be added in the following changes.
2. Corresponding resources discovery and initialzation functions.

Changes in v4:
- Deleted unnecessary headers

Changes in v3:
- Fixed style problem found by checkpatch.pl --strict.

Changes in v2:
- Unified abbreviation of "pipeline" to "pipe".

Signed-off-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>