Re: [PATCH -next] drm/komeda: Convert to DEFINE_SHOW_ATTRIBUTE

2020-07-17 Thread james qian wang (Arm Technology China)
On Fri, Jul 17, 2020 at 09:06:57AM +0200, Daniel Vetter wrote: > On Fri, Jul 17, 2020 at 8:40 AM james qian wang (Arm Technology China) > wrote: > > > > On Thu, Jul 16, 2020 at 05:03:33PM +0800, Qinglang Miao wrote: > > > From: Liu Shixin > > > > > >

Re: [PATCH -next] drm/komeda: Convert to DEFINE_SHOW_ATTRIBUTE

2020-07-17 Thread james qian wang (Arm Technology China)
On Thu, Jul 16, 2020 at 05:03:33PM +0800, Qinglang Miao wrote: > From: Liu Shixin > > Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. > > Signed-off-by: Liu Shixin > --- > drivers/gpu/drm/arm/display/komeda/komeda_dev.c | 13 + > 1 file changed, 1 insertion(+), 12

Re: [PATCH v5 1/4] drm: Add a new helper drm_color_ctm_s31_32_to_qm_n()

2019-10-18 Thread james qian wang (Arm Technology China)
On Fri, Oct 18, 2019 at 09:30:11AM +, Mihail Atanassov wrote: > On Friday, 18 October 2019 08:51:09 BST james qian wang (Arm Technology > China) wrote: > > On Wed, Oct 16, 2019 at 11:02:03AM +, Mihail Atanassov wrote: > > > On Wednesday, 16 October 2019 11:34:08 BST

Re: [PATCH v5 1/4] drm: Add a new helper drm_color_ctm_s31_32_to_qm_n()

2019-10-18 Thread james qian wang (Arm Technology China)
On Wed, Oct 16, 2019 at 11:02:03AM +, Mihail Atanassov wrote: > On Wednesday, 16 October 2019 11:34:08 BST james qian wang (Arm Technology > China) wrote: > > Add a new helper function drm_color_ctm_s31_32_to_qm_n() for driver to > > convert S31.32 sign-magnitude to Q

Re: [PATCH v2 2/4] drm/komeda: Introduce komeda_color_manager/state

2019-08-19 Thread james qian wang (Arm Technology China)
On Wed, Aug 14, 2019 at 10:47:40AM +, Mihail Atanassov wrote: > On Wednesday, 14 August 2019 08:52:18 BST james qian wang (Arm Technology > China) wrote: > > On Tue, Aug 13, 2019 at 09:51:08AM +, Mihail Atanassov wrote: > > > Hi James, > > > > > >

[PATCH v2 2/4] drm/komeda: Introduce komeda_color_manager/state

2019-08-12 Thread james qian wang (Arm Technology China)
- gamma table management and hide the HW difference for komeda-CORE Signed-off-by: James Qian Wang (Arm Technology China) --- .../arm/display/komeda/komeda_color_mgmt.c| 126 ++ .../arm/display/komeda/komeda_color_mgmt.h| 32 - 2 files changed, 156 insertions(+), 2

[PATCH] drm/komeda: Fix warning -Wunused-but-set-variable

2019-08-12 Thread james qian wang (Arm Technology China)
/komeda_kms.c:209:25: warning: variable ‘old_crtc_st’ set but not used [-Wunused-but-set-variable] struct drm_crtc_state *old_crtc_st, *new_crtc_st; ^~~ Signed-off-by: james qian wang (Arm Technology China) --- drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 6

Re: drm/komeda: Fix potential integer overflow in komeda_crtc_update_clock_ratio

2019-08-12 Thread james qian wang (Arm Technology China)
return; > } > > - pxlclk = kcrtc_st->base.adjusted_mode.crtc_clock * 1000; > + pxlclk = kcrtc_st->base.adjusted_mode.crtc_clock * 1000ULL; > aclk = komeda_crtc_get_aclk(kcrtc_st); > > kcrtc_st->clock_ratio = div64_u64(aclk << 32, pxlclk); Thank you for the patch. Reviewed-by: James Qian Wang (Arm Technology China)

Re: [PATCH v2.1] drm/komeda: Add support for 'memory-region' DT node property

2019-08-05 Thread james qian wang (Arm Technology China)
pipeline") == 0) { > ret = komeda_parse_pipe_dt(mdev, child); > @@ -292,6 +299,8 @@ void komeda_dev_destroy(struct komeda_dev *mdev) > > mdev->n_pipelines = 0; > > + of_reserved_mem_device_release(dev); > + > if (funcs && funcs->cleanup) > funcs->cleanup(mdev); > > -- > 2.22.0 Thank you. Reviewed-by: James Qian Wang (Arm Technology China)

[PATCH 1/2] drm/komeda: Disable slave pipeline support

2019-07-05 Thread james qian wang (Arm Technology China)
Since the property slave_planes have been removed, to avoid the resource assignment problem in user disable slave pipeline support temporarily. Signed-off-by: james qian wang (Arm Technology China) --- drivers/gpu/drm/arm/display/komeda/komeda_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH v2 2/2] drm/komeda: Adds komeda_kms_drop_master

2019-06-14 Thread james qian wang (Arm Technology China)
On Fri, Jun 14, 2019 at 09:01:11AM +0200, Daniel Vetter wrote: > On Fri, Jun 14, 2019 at 05:46:04AM +0000, james qian wang (Arm Technology > China) wrote: > > On Thu, Jun 13, 2019 at 04:30:08PM +0200, Daniel Vetter wrote: > > > On Thu, Jun 13, 2019 at 02:24:37PM +01

[PATCH v2 1/2] drm/komeda: Add new component komeda_splitter

2019-06-12 Thread james qian wang (Arm Technology China)
Similar to Layer Split, but Splitter is used for writeback, which splits the compiz result to two half parts and then feed them to two scalers. v2: Rebase Signed-off-by: James Qian Wang (Arm Technology China) --- .../arm/display/komeda/d71/d71_component.c| 63 +++ .../drm

Re: [PATCH v3 2/2] drm/komeda: Adds limitation check for AFBC wide block not support Rot90

2019-05-28 Thread james qian wang (Arm Technology China)
t; + dflow->rot)) > return -EINVAL; > > c_st = komeda_component_get_state_and_set_user(_layer->base, > diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_plane.c > b/drivers/gpu/drm/arm/display/komeda/komeda_plane.c > index c9f37ff..798ee24 100644 > --- a/drivers/gpu/drm/arm/display/komeda/komeda_plane.c > +++ b/drivers/gpu/drm/arm/display/komeda/komeda_plane.c > @@ -216,7 +216,7 @@ static void komeda_plane_reset(struct drm_plane *plane) > u32 layer_type = kplane->layer->layer_type; > > return komeda_format_mod_supported(>fmt_tbl, layer_type, > -format, modifier); > +format, modifier, 0); > } > > static const struct drm_plane_funcs komeda_plane_funcs = { > -- > 1.9.1 > LGTM. Reviewed-by: James Qian Wang (Arm Technology China)

Re: [PATCH v3] drm/komeda: Add writeback support

2019-05-21 Thread james qian wang (Arm Technology China)
Hi Ayan: Sorry for late. On Thu, May 16, 2019 at 08:33:45PM +0800, Ayan Halder wrote: > On Thu, May 16, 2019 at 09:13:27AM +0100, james qian wang (Arm Technology > China) wrote: > > Komeda driver uses a individual component to describe the HW's writeback > > caps, but driv

Re: [v2] drm/komeda: Creates plane alpha and blend mode properties

2019-05-20 Thread james qian wang (Arm Technology China)
> + > + err = drm_plane_create_blend_mode_property(plane, > + BIT(DRM_MODE_BLEND_PIXEL_NONE) | > + BIT(DRM_MODE_BLEND_PREMULTI) | > + BIT(DRM_MODE_BLEND_COVERAGE)); > + if (err) > + goto cleanup; > + &

[PATCH v2 05/11] drm/komeda: Add komeda_crtc_prepare/unprepare

2019-01-22 Thread james qian wang (Arm Technology China)
From: "james qian wang (Arm Technology China)" 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

[PATCH v2 10/11] drm/komeda: Add sysfs attribute: core_id and config_id

2019-01-22 Thread james qian wang (Arm Technology China)
From: "james qian wang (Arm Technology China)" Add two sysfs node: core_id, config_id, user can read them to fetch the HW product information. v2: Rebase Signed-off-by: James Qian Wang (Arm Technology China) --- .../drm/arm/display/include/malidp_product.h | 12 + .../g

[PATCH v2 11/11] drm/komeda: Expose bus_width to Komeda-CORE

2019-01-22 Thread james qian wang (Arm Technology China)
From: "james qian wang (Arm Technology China)" CHIP set bus_width according to the HW configuration, and CORE will use it as buffer alignment. v2: Rebase Signed-off-by: James Qian Wang (Arm Technology China) --- drivers/gpu/drm/arm/display/komeda/d71/d71_dev.c | 1 + drivers/g

[PATCH v2 07/11] drm/komeda: Add komeda_crtc_vblank_enable/disable

2019-01-22 Thread james qian wang (Arm Technology China)
From: "james qian wang (Arm Technology China)" Add a new komeda_dev_func->on_off_vblank to enable/disable HW vblank event Signed-off-by: James Qian Wang (Arm Technology China) --- .../gpu/drm/arm/display/komeda/d71/d71_dev.c | 10 ++ .../gpu/drm/arm/display/komeda/komeda

[PATCH v2 04/11] drm/komeda: Add komeda_crtc_mode_valid/fixup

2019-01-22 Thread james qian wang (Arm Technology China)
From: "james qian wang (Arm Technology China)" komeda_crtc_mode_valid compares the input mode->clk with main engine clk and AXI clk, and reject the mode if the required pixel clk can not be satisfied by main engine clk and AXI-clk. Signed-off-by: James Qian Wang (Arm Tec

[PATCH v2 08/11] drm/komeda: Add komeda_crtc_funcs

2019-01-22 Thread james qian wang (Arm Technology China)
From: "james qian wang (Arm Technology China)" Added functions: - komeda_crtc_reset - komeda_crtc_vblank_enable - komeda_crtc_vblank_disable Signed-off-by: James Qian Wang (Arm Technology China) --- .../gpu/drm/arm/display/komeda/komeda_crtc.c | 48 +++ 1 file c

[PATCH v2 09/11] drm/komeda: Add komeda_kms_check

2019-01-22 Thread james qian wang (Arm Technology China)
From: "james qian wang (Arm Technology China)" Implement komeda_kms_check to add all affected_planes (even unchanged) to drm_atomic_state. since komeda need to re-calculate the resources assumption in every commit. v2: Rebase Signed-off-by: James Qian Wang (Arm Technology China) --

[PATCH v2 06/11] drm/komeda: Add komeda_crtc_atomic_enable/disable

2019-01-22 Thread james qian wang (Arm Technology China)
From: "james qian wang (Arm Technology China)" Pass enable/disable command to komeda and adjust komeda hardware for enable/disable a display instance. v2: Rebase Signed-off-by: James Qian Wang (Arm Technology China) --- .../gpu/drm/arm/display/komeda/komeda_crt

[PATCH v2 03/11] drm/komeda: Add komeda_crtc_atomic_flush

2019-01-22 Thread james qian wang (Arm Technology China)
From: "james qian wang (Arm Technology China)" 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) --- .../gpu/drm/arm/display/komeda/

[PATCH v2 02/11] drm/komeda: Add komeda_release_unclaimed_resources

2019-01-22 Thread james qian wang (Arm Technology China)
From: "james qian wang (Arm Technology China)" Komeda driver treats KMS-CRTC/PLANE as user which will acquire pipeline resources, but we still need to release the unclaimed resources. crtc_atomic_check is the final check stage, so beside build a display data pipeline according the

[PATCH v2 00/11] Implement komeda DRM-Crtc

2019-01-22 Thread james qian wang (Arm Technology China)
This is the 4th patchset for komeda-driver, with this patchset the driver can bring up and enable the D71 support with basic features. This patchset implemented komeda_crtc/crtc_helper functions for DRM-crtc. v2: Rebase james qian wang (Arm Technology China) (11): drm/komeda: Add

[PATCH v2 01/11] drm/komeda: Add komeda_build_display_data_flow

2019-01-22 Thread james qian wang (Arm Technology China)
From: "james qian wang (Arm Technology China)" This function builds a display output pipeline according to crtc_state. And this change only added single pipeline support, the dual pipeline with slave enabled data flow support will be added in the following change. v2: Rebase

[PATCH v2 5/5] drm/komeda: Add komeda_plane/plane_helper_funcs

2019-01-22 Thread james qian wang (Arm Technology China)
From: "james qian wang (Arm Technology China)" Per komeda design KMS-plane maps to komeda layer input pipeline. komeda_plane_atomic_check is for building a komeda layer input pipeline. And KMS-plane is only a user of komeda resources. so there is no real HW update for plane, but all

[PATCH v2 2/5] drm/komeda: Add komeda_pipeline/component_get_state_and_set_user

2019-01-22 Thread james qian wang (Arm Technology China)
From: "james qian wang (Arm Technology China)" get_state_and_set_user packed get_state and set_user into one function, which get pipeline/component state for a specific pipeline/component, if success set the user to it. v2: - Rebase. - Applied commit: b962a12050a3 ("drm/at

[PATCH v2 3/5] drm/komeda: Initialize komeda component as drm private object

2019-01-22 Thread james qian wang (Arm Technology China)
From: "james qian wang (Arm Technology China)" Initialize koemda_layer, komeda_compiz, komeda_improc and komeda_timing_ctrlr as drm private object, then track komeda private component state by drm_atomic_state. v2: - Update code after Applied commit: b962a12050a3 ("drm/at

[PATCH v2 1/5] drm: Add drm_atomic_get_old/new_private_obj_state

2019-01-22 Thread james qian wang (Arm Technology China)
From: "james qian wang (Arm Technology China)" This pair of functions return the old/new private object state for the given private_obj, or NULL if the private_obj is not part of the global atomic state. Reviewed-by: Alexandru Gheorghe Signed-off-by: James Qian Wang (Arm Techno

[PATCH v2 4/5] drm/komeda: Add komeda_build_layer_data_flow

2019-01-22 Thread james qian wang (Arm Technology China)
From: "james qian wang (Arm Technology China)" build_layer_data_flow builds a input pipeline according to plane_state. and in this initial stage only added this simplest pipeline usage: Layer -> compiz The scaler and layer_split will be added in the future. v2: - Rebase. - Int

[PATCH v2 0/5] Implement komeda DRM-Plane

2019-01-22 Thread james qian wang (Arm Technology China)
mit: b962a12050a3 ("drm/atomic: integrate modeset lock with private objects") james qian wang (Arm Technology China) (5): drm: Add drm_atomic_get_old/new_private_obj_state drm/komeda: Add komeda_pipeline/component_get_state_and_set_user drm/komeda: Initialize komeda component a

[PATCH v2 4/7] drm/komeda: Add D71 improc and timing_ctrlr

2019-01-22 Thread james qian wang (Arm Technology China)
From: "james qian wang (Arm Technology China)" Add and initialize improc and timing_ctrlr according to D71 capablitites v2: Rebase. Signed-off-by: James Qian Wang (Arm Technology China) --- .../arm/display/komeda/d71/d71_component.c| 111 +- .../gpu/drm/arm/disp

[PATCH v2 6/7] drm/komeda: Add irq handling

2019-01-22 Thread james qian wang (Arm Technology China)
From: "james qian wang (Arm Technology China)" 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 handlin

[PATCH v2 7/7] drm/komeda: Add debugfs node "register" for register dump

2019-01-22 Thread james qian wang (Arm Technology China)
From: "james qian wang (Arm Technology China)" 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.

[PATCH v2 5/7] drm/komeda: Add komeda_assemble_pipelines

2019-01-22 Thread james qian wang (Arm Technology China)
From: "james qian wang (Arm Technology China)" komeda_accemble_pipelines is for: 1. Verifing the component->supported_inputs according to the pipeline->avail_components. 2. Generating component->supported_outputs. v2: Lower the debug message of komeda_component_dump to

[PATCH v2 3/7] drm/komeda: Add d71 compiz component

2019-01-22 Thread james qian wang (Arm Technology China)
From: "james qian wang (Arm Technology China)" Implement d71_compiz_init and add compiz component to komeda-CORE v2: Rebase. Signed-off-by: James Qian Wang (Arm Technology China) --- .../arm/display/komeda/d71/d71_component.c| 92 ++- .../drm/arm/disp

[PATCH v2 0/7] D71 pipeline/component descovery and initialization

2019-01-22 Thread james qian wang (Arm Technology China)
, merger, splitter will be added in the future. v2: - Rebase. - Use DRM_DEBUG as default msg printer - Return the specific errno not -1. james qian wang (Arm Technology China) (7): drm/komeda: Add d71_enum_resources and d71_cleanup drm/komeda: Add d71 layer drm/komeda: Add d71 compiz component

[PATCH v2 1/7] drm/komeda: Add d71_enum_resources and d71_cleanup

2019-01-22 Thread james qian wang (Arm Technology China)
From: "james qian wang (Arm Technology China)" D71 consists of a number of Register Blocks, every Block controls a specific HW function, every block has a common block_header to represent its type and pipeline information. GCU (Global Control Unit) is the first Block which describe

[PATCH v2 2/7] drm/komeda: Add d71 layer

2019-01-22 Thread james qian wang (Arm Technology China)
From: "james qian wang (Arm Technology China)" 1. Add detailed layer/layer_state definitions 2. Add d71_layer_init to report layer features and capabilities according to D71 layer block. 3. Add d71_layer_updat/disable v2: Rebase. Signed-off-by: James Qian Wang (Arm Techno

Re: drm/komeda: Remove unused variable

2019-01-21 Thread james qian wang (Arm Technology China)
quot;) > Signed-off-by: Gustavo A. R. Silva Reviewed-by: James Qian Wang (Arm Technology China) > --- > drivers/gpu/drm/arm/display/komeda/komeda_dev.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_dev.c > b/drivers/gpu/drm/ar

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

2019-01-17 Thread james qian wang (Arm Technology China)
d-off-by: Liviu Dudau Reviewed-by: James Qian Wang (Arm Technology China) > --- > drivers/gpu/drm/arm/display/komeda/komeda_dev.c | 5 - > drivers/gpu/drm/arm/display/komeda/komeda_dev.h | 3 --- > drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 4 +--- > 3 files changed

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

2019-01-17 Thread james qian wang (Arm Technology China)
d-off-by: Liviu Dudau Reviewed-by: James Qian Wang (Arm Technology China) > --- > drivers/gpu/drm/arm/display/komeda/komeda_dev.c | 5 - > drivers/gpu/drm/arm/display/komeda/komeda_dev.h | 3 --- > drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 4 +--- > 3 files changed

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

2019-01-17 Thread james qian wang (Arm Technology China)
d-off-by: Liviu Dudau Reviewed-by: James Qian Wang (Arm Technology China) > --- > drivers/gpu/drm/arm/display/komeda/komeda_dev.c | 5 - > drivers/gpu/drm/arm/display/komeda/komeda_dev.h | 3 --- > drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 4 +--- > 3 files changed

Re: [PATCH 1/7] drm/komeda: Add d71_enum_resources and d71_cleanup

2019-01-09 Thread james qian wang (Arm Technology China)
On 2019/1/7, 9:41 PM, "Brian Starkey" wrote: Hi James, A few minor comments. On Mon, Dec 24, 2018 at 08:58:46AM +0000, james qian wang (Arm Technology China) wrote: > D71 consists of a number of Register Blocks, every Block controls a > spec

[PATCH v4 9/9] MAINTAINERS: Add maintainer for Arm komeda driver

2019-01-03 Thread james qian wang (Arm Technology China)
From: "james qian wang (Arm Technology China)" v4: Added git tree [Daniel Vetter] v2: Adjusted the position of KOMEDA by alphabetical order Signed-off-by: James Qian Wang (Arm Technology China) Acked-by: Liviu Dudau --- MAINTAINERS | 10 ++ 1 file changed, 10 insertion

[PATCH v4 8/9] drm/doc: Add initial komeda driver documentation

2019-01-03 Thread james qian wang (Arm Technology China)
From: "james qian wang (Arm Technology China)" v2: Some editing changes according to Randy Dunlap's comments Signed-off-by: James Qian Wang (Arm Technology China) --- Documentation/gpu/drivers.rst| 1 + Documentation/gpu/komeda-kms.rst | 488 ++

[PATCH v4 4/9] drm/komeda: Add DT parsing

2019-01-03 Thread james qian wang (Arm Technology China)
From: "james qian wang (Arm Technology China)" 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 "pip

[PATCH v4 5/9] drm/komeda: Add komeda_format_caps for format handling

2019-01-03 Thread james qian wang (Arm Technology China)
From: "james qian wang (Arm Technology China)" komeda_format_caps is for describing ARM display specific features and limitations of a specific format, and format_caps will be linked into _framebuffer like a extension of _format_info. And komed_format_caps_table will be initiali

[PATCH v4 7/9] drm/komeda: Attach komeda_dev to DRM-KMS

2019-01-03 Thread james qian wang (Arm Technology China)
From: "james qian wang (Arm Technology China)" Add komeda_kms abstracton to attach komeda_dev to DRM-KMS CRTC: according to the komeda_pipeline PLANE: according to komeda_layer (layer input pipeline) PRIVATE_OBJS: komeda_pipeline/component all will be treat as private_objs

[PATCH v4 6/9] drm/komeda: Add komeda_framebuffer

2019-01-03 Thread james qian wang (Arm Technology China)
From: "james qian wang (Arm Technology China)" komeda_framebuffer is for extending drm_framebuffer to add komeda own attributes and komeda specific fb handling. Changes in v3: - Fixed style problem found by checkpatch.pl --strict. Signed-off-by: James Qian Wang (Arm Technology Chi

[PATCH v4 2/9] dt/bindings: drm/komeda: Add DT bindings for ARM display processor D71

2019-01-03 Thread james qian wang (Arm Technology China)
From: "james qian wang (Arm Technology China)" Add DT bindings documentation for the ARM display processor D71 and later IPs. Changes in v4: - Deleted unnecessary address-cells, size-cells [Liviu Dudau] Changes in v3: - Deleted unnecessary property: interrupt-names. - Drop

[PATCH v4 1/9] drm/komeda: komeda_dev/pipeline/component definition and initialzation

2019-01-03 Thread james qian wang (Arm Technology China)
From: "james qian wang (Arm Technology China)" 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 ini

[PATCH v4 3/9] drm/komeda: Build komeda to be a platform module

2019-01-03 Thread james qian wang (Arm Technology China)
From: "james qian wang (Arm Technology China)" 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

[PATCH v4 0/9] Overview of Arm komeda display driver

2019-01-03 Thread james qian wang (Arm Technology China)
ding new chipset or IP in future. v4 - Address Liviu and Daniel's comments. v3: - Fixed style problem found by checkpatch.pl --strict. - Updated DT binding document according to Rob Herring's comments. v2: - Use "pipe" (to replace "ppl") as the short form of "pipeline&q

[PATCH 0/9] Overview of Arm komeda display driver

2019-01-03 Thread james qian wang (Arm Technology China)
ding new chipset or IP in future. v4 - Address Liviu and Daniel's comments. v3: - Fixed style problem found by checkpatch.pl --strict. - Updated DT binding document according to Rob Herring's comments. v2: - Use "pipe" (to replace "ppl") as the short form of "pipeline&q

Re: [PATCH v3 9/9] MAINTAINERS: Add maintainer for arm komeda driver

2018-12-28 Thread james qian wang (Arm Technology China)
On Mon, Dec 24, 2018 at 02:05:43PM +0100, Daniel Vetter wrote: > On Mon, Dec 24, 2018 at 1:33 PM Liviu Dudau wrote: > > > > On Fri, Dec 21, 2018 at 10:01:06AM +0000, james qian wang (Arm Technology > > China) wrote: > > > v2: Adjusted the position o

Re: [PATCH v3 7/9] drm/komeda: Attach komeda_dev to DRM-KMS

2018-12-27 Thread james qian wang (Arm Technology China)
On Thu, Dec 27, 2018 at 10:31:52PM +0800, Liviu Dudau wrote: > On Thu, Dec 27, 2018 at 07:09:07AM +0000, james qian wang (Arm Technology > China) wrote: > > On Mon, Dec 24, 2018 at 08:32:14PM +0800, Liviu Dudau wrote: > > > On Fri, Dec 21, 2018 at 10:00:33AM +0000, james qian

Re: [PATCH v3 7/9] drm/komeda: Attach komeda_dev to DRM-KMS

2018-12-26 Thread james qian wang (Arm Technology China)
On Mon, Dec 24, 2018 at 08:32:14PM +0800, Liviu Dudau wrote: > On Fri, Dec 21, 2018 at 10:00:33AM +0000, james qian wang (Arm Technology > China) wrote: > > Add komeda_kms abstracton to attach komeda_dev to DRM-KMS > > CRTC: according to the komeda_pipeline >

Re: [PATCH v3 1/9] drm/komeda: komeda_dev/pipeline/component definition and initialzation

2018-12-26 Thread james qian wang (Arm Technology China)
On Mon, Dec 24, 2018 at 07:57:41PM +0800, Liviu Dudau wrote: > On Fri, Dec 21, 2018 at 09:58:55AM +0000, james qian wang (Arm Technology > China) wrote: > > 1. Added a brief definition of komeda_dev/pipeline/component, this change > >didn't add the detailed component feature

Re: [PATCH v3 2/9] dt/bindings: drm/komeda: Add DT bindings for ARM display processor D71

2018-12-26 Thread james qian wang (Arm Technology China)
On Mon, Dec 24, 2018 at 08:00:51PM +0800, Liviu Dudau wrote: > On Fri, Dec 21, 2018 at 09:59:12AM +0000, james qian wang (Arm Technology > China) wrote: > > Add DT bindings documentation for the ARM display processor D71 and later > > IPs. > > > > Si

[PATCH 11/11] drm/komeda: Expose bus_width to Komeda-CORE

2018-12-24 Thread james qian wang (Arm Technology China)
CHIP set bus_width according to the HW configuration, and CORE will use it as buffer alignment. Signed-off-by: James (Qian) Wang --- drivers/gpu/drm/arm/display/komeda/d71/d71_dev.c | 1 + drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 6 +++--- 2 files changed, 4 insertions(+), 3

[PATCH 10/11] drm/komeda: Add sysfs attribute: core_id and config_id

2018-12-24 Thread james qian wang (Arm Technology China)
Add two sysfs node: core_id, config_id, user can read them to fetch the HW product information. Signed-off-by: James (Qian) Wang --- .../drm/arm/display/include/malidp_product.h | 12 + .../gpu/drm/arm/display/komeda/komeda_dev.c | 48 +++

[PATCH 09/11] drm/komeda: Add komeda_kms_check

2018-12-24 Thread james qian wang (Arm Technology China)
Implement komeda_kms_check to add all affected_planes (even unchanged) to drm_atomic_state. since komeda need to re-calculate the resources assumption in every commit. Signed-off-by: James (Qian) Wang --- .../gpu/drm/arm/display/komeda/komeda_kms.c | 30 ++- 1 file changed, 29

[PATCH 08/11] drm/komeda: Add komeda_crtc_funcs

2018-12-24 Thread james qian wang (Arm Technology China)
Added functions: - komeda_crtc_reset - komeda_crtc_vblank_enable - komeda_crtc_vblank_disable Signed-off-by: James (Qian) Wang --- .../gpu/drm/arm/display/komeda/komeda_crtc.c | 48 +++ 1 file changed, 48 insertions(+) diff --git

[PATCH 06/11] drm/komeda: Add komeda_crtc_atomic_enable/disable

2018-12-24 Thread james qian wang (Arm Technology China)
Pass enable/disable command to komeda and adjust komeda hardware for enable/disable a display instance. Signed-off-by: James (Qian) Wang --- .../gpu/drm/arm/display/komeda/komeda_crtc.c | 102 +- .../gpu/drm/arm/display/komeda/komeda_kms.h | 3 +

[PATCH 07/11] drm/komeda: Add komeda_crtc_vblank_enable/disable

2018-12-24 Thread james qian wang (Arm Technology China)
Add a new komeda_dev_func->on_off_vblank to enable/disable HW vblank event Signed-off-by: James (Qian) Wang --- .../gpu/drm/arm/display/komeda/d71/d71_dev.c | 10 ++ .../gpu/drm/arm/display/komeda/komeda_crtc.c | 19 +++ .../gpu/drm/arm/display/komeda/komeda_dev.h |

[PATCH 05/11] drm/komeda: Add komeda_crtc_prepare/unprepare

2018-12-24 Thread james qian wang (Arm Technology China)
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. Signed-off-by: James (Qian) Wang --- .../gpu/drm/arm/display/komeda/d71/d71_dev.c | 32

[PATCH 04/11] drm/komeda: Add komeda_crtc_mode_valid/fixup

2018-12-24 Thread james qian wang (Arm Technology China)
komeda_crtc_mode_valid compares the input mode->clk with main engine clk and AXI clk, and reject the mode if the required pixel clk can not be satisfied by main engine clk and AXI-clk. Signed-off-by: James (Qian) Wang --- .../gpu/drm/arm/display/komeda/komeda_crtc.c | 52 +++ 1

[PATCH 00/11] Implement komeda DRM-Crtc

2018-12-24 Thread james qian wang (Arm Technology China)
This is the 4th patchset for komeda-driver, with this patchset the driver can bring up and enable the D71 support with basic features. This patchset implemented komeda_crtc/crtc_helper functions for DRM-crtc. James (Qian) Wang (11): drm/komeda: Add komeda_build_display_data_flow drm/komeda:

[PATCH 02/11] drm/komeda: Add komeda_release_unclaimed_resources

2018-12-24 Thread james qian wang (Arm Technology China)
Komeda driver treats KMS-CRTC/PLANE as user which will acquire pipeline resources, but we still need to release the unclaimed resources. crtc_atomic_check is the final check stage, so beside build a display data pipeline according the crtc_state, but still needs to release/disable the unclaimed

[PATCH 01/11] drm/komeda: Add komeda_build_display_data_flow

2018-12-24 Thread james qian wang (Arm Technology China)
This function builds a display output pipeline according to crtc_state. And this change only added single pipeline support, the dual pipeline with slave enabled data flow support will be added in the following change. Signed-off-by: James (Qian) Wang ---

[PATCH 03/11] drm/komeda: Add komeda_crtc_atomic_flush

2018-12-24 Thread james qian wang (Arm Technology China)
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 --- .../gpu/drm/arm/display/komeda/d71/d71_dev.c | 11 ++ .../gpu/drm/arm/display/komeda/komeda_crtc.c | 33

[PATCH 4/5] drm/komeda: Add komeda_build_layer_data_flow

2018-12-24 Thread james qian wang (Arm Technology China)
build_layer_data_flow builds a input pipeline according to plane_state. and in this initial stage only added this simplest pipeline usage: Layer -> compiz The scaler and layer_split will be added in the future. Signed-off-by: James (Qian) Wang --- .../drm/arm/display/komeda/komeda_pipeline.h

[PATCH 5/5] drm/komeda: Add komeda_plane/plane_helper_funcs

2018-12-24 Thread james qian wang (Arm Technology China)
Per komeda design KMS-plane maps to komeda layer input pipeline. komeda_plane_atomic_check is for building a komeda layer input pipeline. And KMS-plane is only a user of komeda resources. so there is no real HW update for plane, but all HW update will be handled in crtc->flush. Signed-off-by:

[PATCH 3/5] drm/arm/komeda: Initialize komeda component as drm private object

2018-12-24 Thread james qian wang (Arm Technology China)
Initialize koemda_layer, komeda_compiz, komeda_improc and komeda_timing_ctrlr as drm private object, then track komeda private component state by drm_atomic_state. Signed-off-by: James (Qian) Wang --- .../arm/display/komeda/komeda_private_obj.c | 200 +- 1 file changed, 198

[PATCH 1/5] drm: Add drm_atomic_get_old/new_private_obj_state

2018-12-24 Thread james qian wang (Arm Technology China)
This pair of functions return the old/new private object state for the given private_obj, or NULL if the private_obj is not part of the global atomic state. Reviewed-by: Alexandru Gheorghe Signed-off-by: James (Qian) Wang --- drivers/gpu/drm/drm_atomic.c | 45

[PATCH 0/5] Implement komeda DRM-Plane

2018-12-24 Thread james qian wang (Arm Technology China)
This is the 3rd patchset for the komeda driver. This patchset implemented plane/plane_helper functions for DRM-Plane. per the komeda driver design, A DRM-plane maps to komeda layer input pipeline, so the plane->atomic_check will build a layer input pipeline according to the plane_state. and with

[PATCH 2/5] drm/komeda: Add komeda_pipeline/component_get_state_and_set_user

2018-12-24 Thread james qian wang (Arm Technology China)
get_state_and_set_user packed get_state and set_user into one function, which get pipeline/component state for a specific pipeline/component, if success set the user to it. Signed-off-by: James (Qian) Wang --- drivers/gpu/drm/arm/display/komeda/Makefile | 1 +

[PATCH 7/7] drm/komeda: Add debugfs node "register" for register dump

2018-12-24 Thread james qian wang (Arm Technology China)
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/display/komeda/d71/d71_component.c

[PATCH 6/7] drm/komeda: Add irq handling

2018-12-24 Thread james qian wang (Arm Technology China)
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)

[PATCH 5/7] drm/komeda: Add komeda_assemble_pipelines

2018-12-24 Thread james qian wang (Arm Technology China)
komeda_accemble_pipelines is for: 1. Verifing the component->supported_inputs according to the pipeline->avail_components. 2. Generating component->supported_outputs. Signed-off-by: James (Qian) Wang --- .../gpu/drm/arm/display/komeda/komeda_dev.c | 6 ++

[PATCH 3/7] arm/komeda: Add d71 compiz component

2018-12-24 Thread james qian wang (Arm Technology China)
Implement d71_compiz_init and add compiz component to komeda-CORE Signed-off-by: James (Qian) Wang --- .../arm/display/komeda/d71/d71_component.c| 95 ++- .../drm/arm/display/komeda/komeda_pipeline.h | 26 +++-- 2 files changed, 113 insertions(+), 8 deletions(-) diff --git

[PATCH 4/7] drm/komeda: Add D71 improc and timing_ctrlr

2018-12-24 Thread james qian wang (Arm Technology China)
Add and initialize improc and timing_ctrlr according to D71 capablitites Signed-off-by: James (Qian) Wang --- .../arm/display/komeda/d71/d71_component.c| 108 +- .../gpu/drm/arm/display/komeda/komeda_kms.h | 2 + .../drm/arm/display/komeda/komeda_pipeline.h | 7 ++ 3

[PATCH 2/7] drm/komeda: Add d71 layer

2018-12-24 Thread james qian wang (Arm Technology China)
1. Add detailed layer/layer_state definitions 2. Add d71_layer_init to report layer features and capabilities according to D71 layer block. 3. Add d71_layer_updat/disable Signed-off-by: James (Qian) Wang --- .../drm/arm/display/include/malidp_utils.h| 17 ++

[PATCH 1/7] drm/komeda: Add d71_enum_resources and d71_cleanup

2018-12-24 Thread james qian wang (Arm Technology China)
D71 consists of a number of Register Blocks, every Block controls a specific HW function, every block has a common block_header to represent its type and pipeline information. GCU (Global Control Unit) is the first Block which describe the global information of D71 HW, Like number of block

[PATCH 0/7] D71 pipeline/component descovery and initialization

2018-12-24 Thread james qian wang (Arm Technology China)
This is the 2nd patchset for komeda-driver. These patches focus on CHIP(D71) Layer for pipeline/component descovery and initialization. All basic and essential display component: layer, compiz, improc, timing-ctrlr and irq handling have been added, other component support: scaler, wb_layer,

[PATCH v3 7/9] drm/komeda: Attach komeda_dev to DRM-KMS

2018-12-21 Thread james qian wang (Arm Technology China)
Add komeda_kms abstracton to attach komeda_dev to DRM-KMS CRTC: according to the komeda_pipeline PLANE: according to komeda_layer (layer input pipeline) PRIVATE_OBJS: komeda_pipeline/component all will be treat as private_objs komeda_kms is for connecting DRM-KMS and komeda_dev, like

[PATCH v3 3/9] drm/komeda: Build komeda to be a platform module

2018-12-21 Thread james qian wang (Arm Technology China)
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 =

[PATCH v3 8/9] drm/doc: Add initial komeda driver documentation

2018-12-21 Thread james qian wang (Arm Technology China)
v2: Some editing changes according to Randy Dunlap's comments Signed-off-by: James (Qian) Wang --- Documentation/gpu/drivers.rst| 1 + Documentation/gpu/komeda-kms.rst | 488 +++ 2 files changed, 489 insertions(+) create mode 100644

[PATCH v3 6/9] drm/komeda: Add komeda_framebuffer

2018-12-21 Thread james qian wang (Arm Technology China)
komeda_framebuffer is for extending drm_framebuffer to add komeda own attributes and komeda specific fb handling. Changes in v3: - Fixed style problem found by checkpatch.pl --strict. Signed-off-by: James (Qian) Wang --- drivers/gpu/drm/arm/display/komeda/Makefile | 3 +-

[PATCH v3 9/9] MAINTAINERS: Add maintainer for arm komeda driver

2018-12-21 Thread james qian wang (Arm Technology China)
v2: Adjusted the position of KOMEDA by alphabetical order Signed-off-by: James (Qian) Wang --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 254b7b267731..e48c2e5fd29f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1124,6 +1124,15 @@ S:

[PATCH v3 7/9] drm/komeda: Attach komeda_dev to DRM-KMS

2018-12-21 Thread james qian wang (Arm Technology China)
Add komeda_kms abstracton to attach komeda_dev to DRM-KMS CRTC: according to the komeda_pipeline PLANE: according to komeda_layer (layer input pipeline) PRIVATE_OBJS: komeda_pipeline/component all will be treat as private_objs komeda_kms is for connecting DRM-KMS and komeda_dev, like

[PATCH v3 1/9] drm/komeda: komeda_dev/pipeline/component definition and initialzation

2018-12-21 Thread james qian wang (Arm Technology China)
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. Signed-off-by: James (Qian) Wang Changes

[PATCH v3 5/9] drm/komeda: Add komeda_format_caps for format handling

2018-12-21 Thread james qian wang (Arm Technology China)
komeda_format_caps is for describing ARM display specific features and limitations of a specific format, and format_caps will be linked into _framebuffer like a extension of _format_info. And komed_format_caps_table will be initialized before the enum_resources, since the layer features

[PATCH v3 2/9] dt/bindings: drm/komeda: Add DT bindings for ARM display processor D71

2018-12-21 Thread james qian wang (Arm Technology China)
Add DT bindings documentation for the ARM display processor D71 and later IPs. Signed-off-by: James (Qian) Wang Changes in v3: - Deleted unnecessary property: interrupt-names. - Dropped 'ports' and moving 'port' up a level. --- .../bindings/display/arm/arm,komeda.txt | 79

[PATCH v3 3/9] drm/komeda: Build komeda to be a platform module

2018-12-21 Thread james qian wang (Arm Technology China)
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 =

[PATCH v3 4/9] drm/komeda: Add DT parsing

2018-12-21 Thread james qian wang (Arm Technology China)
Parse DT and initialize corresponding dev/pipeline attributes. 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 --- .../gpu/drm/arm/display/komeda/komeda_dev.c | 76

[PATCH v3 0/9] Overview of Arm komeda display driver

2018-12-21 Thread james qian wang (Arm Technology China)
This is the first patchset of ARM new komeda display driver, this patchset added all basic structure of komeda, relationship of DRM-KMS with komeda, for tring to give a brife overview of komeda-driver. komeda is for supporting the ARM display processor D71 and later IPs, Since from D71, Arm

  1   2   >