[Freedreno] [PATCH 05/14] drm/i915/hdcp: Consolidate HDCP setup/state cache

2021-09-13 Thread Sean Paul
From: Sean Paul Stick all of the setup for HDCP into a dedicated function. No functional change, but this will facilitate moving HDCP logic into helpers. Signed-off-by: Sean Paul --- drivers/gpu/drm/i915/display/intel_hdcp.c | 52 +++ 1 file changed, 35 insertions(+), 17

[Freedreno] [PATCH 04/14] drm/hdcp: Expand HDCP helper library for enable/disable/check

2021-09-13 Thread Sean Paul
From: Sean Paul This patch expands upon the HDCP helper library to manage HDCP enable, disable, and check. Previous to this patch, the majority of the state management and sink interaction is tucked inside the Intel driver with the understanding that once a new platform supported HDCP we could

[Freedreno] [PATCH 03/14] drm/hdcp: Update property value on content type and user changes

2021-09-13 Thread Sean Paul
From: Sean Paul This patch updates the connector's property value in 2 cases which were previously missed: 1- Content type changes. The value should revert back to DESIRED from ENABLED in case the driver must re-authenticate the link due to the new content type. 2- Userspace sets

[Freedreno] [PATCH 02/14] drm/hdcp: Avoid changing crtc state in hdcp atomic check

2021-09-13 Thread Sean Paul
From: Sean Paul Instead of forcing a modeset in the hdcp atomic check, simply return true if the content protection value is changing and let the driver decide whether a modeset is required or not. Signed-off-by: Sean Paul --- drivers/gpu/drm/drm_hdcp.c | 33

[Freedreno] [PATCH 01/14] drm/hdcp: Add drm_hdcp_atomic_check()

2021-09-13 Thread Sean Paul
From: Sean Paul This patch moves the hdcp atomic check from i915 to drm_hdcp so other drivers can use it. No functional changes, just cleaned up some of the code when moving it over. Signed-off-by: Sean Paul --- drivers/gpu/drm/drm_hdcp.c | 71 - drivers

[Freedreno] [PATCH 00/14] drm/hdcp: Pull HDCP auth/exchange/check into

2021-09-13 Thread Sean Paul
From: Sean Paul Hello, This patchset pulls the HDCP protocol auth/exchange/check logic out from i915 into a HDCP helper library which drivers can use to implement the proper protocol and UAPI interactions for achieving HDCP. Originally this was all stuffed into i915 since it was the only driver

[Freedreno] [RESEND PATCH v6 04/14] drm/msm/dpu: Replace definitions for dpu debug macros

2021-07-21 Thread Sean Paul
From: Sean Paul The debug messages shouldn't be logged as errors when debug categories are enabled. Use the drm logging helpers to do the right thing Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200608210505.48519-5-s...@poorly.run #v5 Changes in v5: -

[Freedreno] [PATCH] drm/msm/dp: Initialize dp->aux->drm_dev before registration

2021-07-14 Thread Sean Paul
From: Sean Paul Avoids the following WARN: [3.009556] [ cut here ] [3.014306] WARNING: CPU: 7 PID: 109 at drivers/gpu/drm/drm_dp_helper.c:1796 drm_dp_aux_register+0xa4/0xac [3.024209] Modules linked in: [3.027351] CPU: 7 PID: 109 Comm: kworker/7:8 Not

[Freedreno] [PATCH] drm/msm: Fix uninitialized var usage in dsi_phy_28nm_8960.c

2021-05-07 Thread Sean Paul
From: Sean Paul This patch fixes the following error: drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm_8960.c:425:11: error: variable 'parent_name' is uninitialized when used here [-Werror,-Wuninitialized] snprintf(parent_name, 32, "dsi%dvco_clk"

Re: [Freedreno] [PATCH v2 2/2] drm/msm/dp: add supported max link rate specified from dtsi

2021-02-22 Thread Sean Paul
On Mon, Feb 22, 2021 at 11:31 AM wrote: > > On 2021-02-19 14:46, Stephen Boyd wrote: > > Quoting khs...@codeaurora.org (2021-02-19 08:39:38) > >> On 2021-02-18 15:02, Stephen Boyd wrote: > >> > Quoting Kuogee Hsieh (2021-02-18 12:55:04) > >> >> Allow supported link rate to be limited to the value

Re: [Freedreno] [PATCH] drm/msm/dpu: fix unitialized variable error

2020-08-11 Thread Sean Paul
On Tue, Aug 11, 2020 at 5:08 PM Rob Clark wrote: > > From: Rob Clark > > drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c:817 dpu_crtc_enable() error: > uninitialized symbol 'request_bandwidth'. > > Reported-by: kernel test robot Reviewed-by: Sean Paul > Signed-o

[Freedreno] [PATCH v5 04/13] drm/msm/dpu: Replace definitions for dpu debug macros

2020-06-08 Thread Sean Paul
From: Sean Paul The debug messages shouldn't be logged as errors when debug categories are enabled. Use the drm logging helpers to do the right thing Signed-off-by: Sean Paul Changes in v5: -Added to the set --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h | 20 1

Re: [Freedreno] [DPU PATCH v5 0/5] Add support for DisplayPort driver on SnapDragon.

2020-04-24 Thread Sean Paul
to nitpick 10k lines of code over multiple iterations. So in the interest of not letting the perfect get in the way of the good, I suggest we apply the set and fix up as time and necessity allow. Patches 2/3/5 are: Acked-by: Sean Paul Sean > The block dia

Re: [Freedreno] [PATCH] drm/msm/dpu: fix BGR565 vs RGB565 confusion

2020-02-13 Thread Sean Paul
m/msm: Add SDM845 DPU support") > Signed-off-by: Rob Clark Reviewed-by: Sean Paul > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c > b/drivers/g

Re: [Freedreno] [REPOST PATCH] drm/msm: Set dma maximum segment size for mdss

2020-01-22 Thread Sean Paul
On Tue, Jan 21, 2020 at 11:26:05AM -0800, Rob Clark wrote: > On Tue, Jan 21, 2020 at 11:19 AM Douglas Anderson > wrote: > > > > From: Sean Paul > > > > Turning on CONFIG_DMA_API_DEBUG_SG results in the following error: > > > > [ 12.078665] msm ae

Re: [Freedreno] [PATCH] drm/msm: use BUG_ON macro for debugging.

2019-12-31 Thread Sean Paul
me >= REG_ADRENO_REGISTER_MAX || > - !gpu->reg_offsets[offset_name]) { > - BUG(); > - } > + BUG_ON(offset_name >= REG_ADRENO_REGISTER_MAX || > !gpu->reg_offsets[offset_name]); > Minor nit: This line is longer than 80 chars Oth

Re: [Freedreno] [PATCH 1/4] drm/msm: fix memleak on release

2019-11-12 Thread Sean Paul
c > > > > > +++ b/drivers/gpu/drm/msm/msm_debugfs.c > > > > > @@ -47,12 +47,8 @@ static int msm_gpu_release(struct inode *inode, > > > > > struct file *file) > > > > > struct msm_gpu_sho

Re: [Freedreno] [PATCH] drm: msm: a6xx: fix debug bus register configuration

2019-11-06 Thread Sean Paul
} > > nr_debugbus_blocks = ARRAY_SIZE(a6xx_debugbus_blocks) + > -- > 1.9.1 > > ___ > Freedreno mailing list > Freedreno@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/freedreno -- Sean Pau

Re: [Freedreno] [PATCH RESEND 07/14] drm/msm/hdmi: Provide ddc symlink in hdmi connector sysfs directory

2019-11-06 Thread Sean Paul
On Mon, Aug 26, 2019 at 3:27 PM Andrzej Pietrasiewicz wrote: > > Use the ddc pointer provided by the generic connector. > > Signed-off-by: Andrzej Pietrasiewicz > Acked-by: Sam Ravnborg > Reviewed-by: Emil Velikov Acked-by: Sean Paul > --- > drivers/gpu/drm/msm/h

Re: [Freedreno] [PATCH v2] drm/msm/dsi: Implement qcom, dsi-phy-regulator-ldo-mode for 28nm PHY

2019-10-25 Thread Sean Paul
phy, int src_pll_id, > @@ -77,8 +105,6 @@ static int dsi_28nm_phy_enable(struct msm_dsi_phy *phy, > int src_pll_id, > > dsi_28nm_phy_regulator_ctrl(phy, true); > > - dsi_phy_write(base + REG_DSI_28nm_PHY_LDO_CNTRL, 0x00); > - > dsi

Re: [Freedreno] [PATCH] drm/msm/dsi: Implement qcom, dsi-phy-regulator-ldo-mode for 28nm PHY

2019-10-21 Thread Sean Paul
_id, > > dsi_28nm_phy_regulator_ctrl(phy, true); > > - dsi_phy_write(base + REG_DSI_28nm_PHY_LDO_CNTRL, 0x00); > - > dsi_28nm_dphy_set_timing(phy, timing); > > dsi_phy_write(base + REG_DSI_28nm_PHY_CTRL_1, 0x00); > -- > 2.23.0 > -- Sean Paul, Software Engineer, Google / Chromium OS ___ Freedreno mailing list Freedreno@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/freedreno

Re: [Freedreno] [PATCH v2] drm/msm/dsi: Implement reset correctly

2019-10-11 Thread Sean Paul
delay of 20 ms, since 16.666 > ms is the time available to process one frame at 60 fps. > > Fixes: a689554ba6ed (drm/msm: Initial add DSI connector support) > Signed-off-by: Jeffrey Hugo Pushed to drm-misc-fixes for 5.4 Thanks! Sean > Reviewed-by: Sean Paul > --- >

Re: [Freedreno] [PATCH v2] drm/msm: Sanitize the modeset_is_locked checks in dpu

2019-10-11 Thread Sean Paul
On Thu, Oct 10, 2019 at 02:17:44PM -0400, Sean Paul wrote: > From: Sean Paul > > As Daniel mentions in his email [1], non-blocking commits don't hold the > modeset locks, so we can safely access state as long as these functions > are in the commit path. So r

Re: [Freedreno] [PATCH 0/4] drm/msm: Remove four set but not used variables

2019-10-11 Thread Sean Paul
t.c| 3 +-- > drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 6 ++ > 4 files changed, 3 insertions(+), 11 deletions(-) > > -- > 2.7.4 > -- Sean Paul, Software Engineer, Google / Chromium OS ___ Freedreno mailing list Freedreno@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/freedreno

Re: [Freedreno] [PATCH] drm/msm/mdp5: make config variables static

2019-10-11 Thread Sean Paul
/drm/msm/disp/mdp5/mdp5_cfg.c:633:26: warning: symbol > 'msm8998_config' was not declared. Should it be static? > > Signed-off-by: Ben Dooks Applied to msm-next, thanks for the patch! Sean > --- > Cc: Rob Clark > Cc: Sean Paul > Cc: David Airlie > Cc: Daniel

Re: [Freedreno] [PATCH] drm/msm: make a5xx_show and a5xx_gpu_state_put static

2019-10-11 Thread Sean Paul
it be static? > > Reviewed-by: Jordan Crouse > Applied to msm-next, thanks for the review and patch! Sean > > Signed-off-by: Ben Dooks > > --- > > Cc: Rob Clark > > Cc: Sean Paul > > Cc: David Airlie > > Cc: Daniel Vetter &

Re: [Freedreno] [PATCH v2 3/5] drm/msm/dsi: Add configuration for 28nm PLL on family B

2019-10-10 Thread Sean Paul
true}, {false, true} }, > + .reg_cfg = { > + .num = 1, > + .regs = { > + {"vddio", 10, 100}, > + }, > + }, > + .ops = { > + .enable = dsi_28nm_phy_enable, > + .disable = dsi_28nm_phy_di

Re: [Freedreno] [PATCH v2 1/5] drm/msm/mdp5: Add optional TBU and TBU_RT clocks

2019-10-10 Thread Sean Paul
sion, and then set a > diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.h > b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.h > index d1bf4fdfc815..128866742593 100644 > --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.h > +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.h > @@ -53,6 +53,

Re: [Freedreno] [PATCH] drm/msm/dsi: Implement reset correctly

2019-10-10 Thread Sean Paul
On Thu, Oct 10, 2019 at 2:45 PM Sean Paul wrote: > > On Wed, Oct 09, 2019 at 02:34:54PM -0700, Jeffrey Hugo wrote: > > On msm8998, vblank timeouts are observed because the DSI controller is not > > reset properly, which ends up stalling the MDP. This is because the reset > &

Re: [Freedreno] [PATCH] drm/msm/dsi: Implement reset correctly

2019-10-10 Thread Sean Paul
(struct msm_dsi_host > *msm_host) > > /* dsi controller can only be reset while clocks are running */ > dsi_write(msm_host, REG_DSI_RESET, 1); > - wmb(); /* make sure reset happen */ > + msleep(20); /* make sure reset happen */ > dsi_write(msm

[Freedreno] [PATCH v2] drm/msm: Sanitize the modeset_is_locked checks in dpu

2019-10-10 Thread Sean Paul
From: Sean Paul As Daniel mentions in his email [1], non-blocking commits don't hold the modeset locks, so we can safely access state as long as these functions are in the commit path. So remove the WARN_ON in dpu_kms_encoder_enable. In dpu_crtc_get_intf_mode, things are a bit more compli

[Freedreno] [PATCH] Revert "drm/msm: dpu: Add modeset lock checks where applicable"

2019-10-10 Thread Sean Paul
From: Sean Paul This reverts commit 1dfdb0e107dbe6ebff3f6bbbe4aad0b5aa87bba4. As Daniel mentions in his email [1], non-blocking commits don't hold the modeset locks, so we can safely access state as long as these functions are in the commit path. I'm not entirely sure if these have a

Re: [Freedreno] [PATCH v2 16/24] drm/msm: dpu: Add modeset lock checks where applicable

2019-10-10 Thread Sean Paul
On Thu, Oct 10, 2019 at 12:20:56AM +0200, Daniel Vetter wrote: > On Fri, Nov 16, 2018 at 7:44 PM Sean Paul wrote: > > > > From: Sean Paul > > > > Add modeset lock checks to functions that could be called outside the > > core atomic stack. > > > > Ch

Re: [Freedreno] [PATCH 10/10] drm/msm: add atomic traces

2019-09-03 Thread Sean Paul
On Thu, Aug 29, 2019 at 09:45:18AM -0700, Rob Clark wrote: > From: Rob Clark > > This was useful for debugging fps drops. I suspect it will be useful > again. > > Signed-off-by: Rob Clark I'm a simple man, I see tracepoints patches and R-b tracepoints patches :)

Re: [Freedreno] [PATCH 09/10] drm/msm/dpu: async commit support

2019-09-03 Thread Sean Paul
On Thu, Aug 29, 2019 at 09:45:17AM -0700, Rob Clark wrote: > From: Rob Clark > > In addition, moving to kms->flush_commit() lets us drop the only user > of kms->commit(). > > Signed-off-by: Rob Clark Reviewed-by: Sean Paul > --- > drivers/gpu/drm/ms

Re: [Freedreno] [PATCH 08/10] drm/msm: async commit support

2019-09-03 Thread Sean Paul
on-async > atomic commits and lots of legacy cursor updates > > Signed-off-by: Rob Clark Some nits, with them addressed, Reviewed-by: Sean Paul > --- > drivers/gpu/drm/msm/msm_atomic.c | 156 ++- > drivers/gpu/drm/msm/msm_drv.c| 1 +

Re: [Freedreno] [PATCH 07/10] drm/msm: split power control from prepare/complete_commit

2019-09-03 Thread Sean Paul
se will no longer be > a good place to enable/disable clocks needed for hw access. > > Signed-off-by: Rob Clark Reviewed-by: Sean Paul > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 17 ++--- > drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c | 19 ++

Re: [Freedreno] [PATCH 05/10] drm/msm: convert kms->complete_commit() to crtc_mask

2019-09-03 Thread Sean Paul
t; we call this after waiting for flush to complete. > > Signed-off-by: Rob Clark Reviewed-by: Sean Paul > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 7 +-- > drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h | 4 +--- > drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 20 -

Re: [Freedreno] [PATCH 06/10] drm/msm: add kms->flush_commit()

2019-09-03 Thread Sean Paul
> + * "async" commit has completed. > + */ > void (*wait_flush)(struct msm_kms *kms, unsigned crtc_mask); > > + /** > + * Clean up are commit is completed. This is called after s/are/our/? With that fixed, Reviewed-by: Sean Paul

Re: [Freedreno] [PATCH 3/9] drm/msm/dpu: handle_frame_done() from vblank irq

2019-08-29 Thread Sean Paul
. > > Signed-off-by: Rob Clark Reviewed-by: Sean Paul > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 7 +- > .../drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 25 ++- > 2 files changed, 9 insertions(+), 23 deletions(-) > > diff --git a/drivers/g

Re: [Freedreno] [PATCH 2/9] drm/msm/dpu: add real wait_for_commit_done()

2019-08-29 Thread Sean Paul
is no pending flush. > > Signed-off-by: Rob Clark Reviewed-by: Sean Paul > --- > .../drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 22 ++- > 1 file changed, 21 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys

Re: [Freedreno] [PATCH 1/9] drm/msm/dpu: unwind async commit handling

2019-08-29 Thread Sean Paul
b Clark Reviewed-by: Sean Paul > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c| 41 ++--- > drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h| 3 +- > drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 39 +++- > drivers/gpu/drm/msm/disp/dpu1/dpu_enco

Re: [Freedreno] [PATCH 4/9] drm/msm: add kms->wait_flush()

2019-08-29 Thread Sean Paul
w/ optional format modifiers from drm_mode_fb_cmd2 */ > const struct msm_format *(*get_format)(struct msm_kms *kms, > const uint32_t format, > @@ -98,4 +97,8 @@ struct msm_mdss { > int mdp5_mdss_init(struct drm_device *dev); > int dpu_

Re: [Freedreno] [PATCH] drm/msm/dpu: remove stray "\n"

2019-08-28 Thread Sean Paul
On Tue, Aug 27, 2019 at 02:10:09PM -0700, Rob Clark wrote: > From: Rob Clark > > The extra line-break in traces was annoying me. > > Signed-off-by: Rob Clark Reviewed-by: Sean Paul > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h | 2 +- > 1 file changed, 1

Re: [Freedreno] [PATCH] drm/msm/dpu: fix "frame done" timeouts

2019-08-21 Thread Sean Paul
t; used in video mode hold an extra reference while they are enabled. The > net effect is that we can determine in frame-done whether it is safe to > drop bandwidth without needing to aquire any modeset locks. > > Signed-off-by: Rob Clark All looks good to me, nice cleanup!

Re: [Freedreno] [PATCH v2 1/1] drm/msm: drop use of drmP.h

2019-08-12 Thread Sean Paul
is not supposed to carry include files it do not need, so > the individual files have to include what extra they needs. > > v2: > - Rebased on top of https://gitlab.freedesktop.org/drm/msm.git msm-next > > Signed-off-by: Sam Ravnborg Acked-by: Sean Paul > Cc: Rob Clark &g

[Freedreno] [PATCH] drm/msm/dsi: Fix return value check for clk_get_parent

2019-08-07 Thread Sean Paul
From: Sean Paul clk_get_parent returns an error pointer upon failure, not NULL. So the checks as they exist won't catch a failure. This patch changes the checks and the return values to properly handle an error pointer. Fixes: c4d8cfe516dc ("drm/msm/dsi: add implementation for helper

Re: [Freedreno] [PATCH AUTOSEL 4.14 11/30] drm/msm: stop abusing dma_map/unmap for cache

2019-08-02 Thread Sean Paul
---[ end trace afc0dc5ab81a06bf ]--- > > Not quite sure what triggered that, but we really shouldn't be abusing > dma_{map,unmap}_sg() for cache maint. > > Cc: Stephen Boyd > Tested-by: Stephen Boyd > Reviewed-by: Jordan Crouse > Signed-off-by: Rob Clark > Sign

[Freedreno] [RESEND PULL] msm-fixes

2019-08-01 Thread Sean Paul
ers/gpu/drm/msm/msm_gem.c | 47 +++ 7 files changed, 64 insertions(+), 8 deletions(-) -- Sean Paul, Software Engineer, Google / Chromium OS ___ Freedreno mailing list Freedreno@lists.freedesktop.org https://lists.freedes

Re: [Freedreno] [PATCH 1/3] drm: msm: a6xx: Mark expected switch fall-through

2019-08-01 Thread Sean Paul
MSM_SUBMIT_CMD_CTX_RESTORE_BUF: > if (priv->lastctx == ctx) > break; > + /* Fall through */ > case MSM_SUBMIT_CMD_BUF: > OUT_PKT7(ring, CP_INDIRECT_BUFFER_PFE, 3); >

Re: [Freedreno] [RFC] Expanding drm_mode_modeinfo flags

2019-07-24 Thread Sean Paul
On Mon, Jul 22, 2019 at 04:50:43PM -0700, Jeykumar Sankaran wrote: > On 2019-07-19 07:29, Sean Paul wrote: > > On Fri, Jul 19, 2019 at 05:15:28PM +0300, Ville Syrjälä wrote: > > > On Fri, Jul 19, 2019 at 09:55:58AM -0400, Sean Paul wrote: > > > > On Fri, Jul 19, 20

Re: [Freedreno] [PATCH] drm/msm: stop abusing dma_map/unmap for cache

2019-07-22 Thread Sean Paul
bj->dev->dev, msm_obj->sgt->sgl, > + dma_sync_sg_for_cpu(obj->dev->dev, > msm_obj->sgt->sgl, >msm_obj->sgt->nents, >DMA_BIDIRECTIONAL); > > -- > 2.20.1 > -- Sean Paul, Software Engineer, Google / Chromium OS ___ Freedreno mailing list Freedreno@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/freedreno

Re: [Freedreno] [PATCH] drm/msm: correct NULL pointer dereference in context_init

2019-07-22 Thread Sean Paul
) > > > > msm_submitqueue_init(dev, ctx); > > > > - ctx->aspace = priv->gpu->aspace; > > + ctx->aspace = priv->gpu ? priv->gpu->aspace : NULL; > > file->driver_priv = ctx; > > > > return 0; >

Re: [Freedreno] drm/msm/dpu: Correct dpu encoder spinlock initialization

2019-07-22 Thread Sean Paul
drm_encoder_helper_add(&dpu_enc->base, &dpu_encoder_helper_funcs); > > + spin_lock_init(&dpu_enc->enc_spinlock); > dpu_enc->enabled = false; > > return &dpu_enc->base; > -- > 1.9.1 > -- Sean Paul, Software Engineer, Google / Chromium OS ___ Freedreno mailing list Freedreno@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/freedreno

Re: [Freedreno] [RFC] Expanding drm_mode_modeinfo flags

2019-07-19 Thread Sean Paul
On Fri, Jul 19, 2019 at 05:15:28PM +0300, Ville Syrjälä wrote: > On Fri, Jul 19, 2019 at 09:55:58AM -0400, Sean Paul wrote: > > On Fri, Jul 19, 2019 at 11:05:53AM +0200, Daniel Vetter wrote: > > > On Thu, Jul 18, 2019 at 11:18:42AM -0700, Jeykumar Sankaran wrote: > >

Re: [Freedreno] [RFC] Expanding drm_mode_modeinfo flags

2019-07-19 Thread Sean Paul
the proposed modeinfo flags to identify glitch-free switches. > > > > bool is_seamless_switch_supported(struct drm_mode_modeinfo src_mode, struct > > drm_mode_modeinfo *dst_mode, bool > > flicker_reduction_supported) > > { > > if (!

Re: [Freedreno] [pull] drm/msm: msm-next for 5.3

2019-06-27 Thread Sean Paul
k with you? Sean PS- If it's fine to format like this, we might want to change the dim check to something like: if [[ "$orig_subject" != *"$fixes_subject"* ]] ; then > > Please fix or squash those and resend. > > Dave. > ___

Re: [Freedreno] [PATCH v2] drm/msm/dsi: Add parentheses to quirks check in dsi_phy_hw_v3_0_lane_settings

2019-06-19 Thread Sean Paul
oks like this patch isn't upstream. What tree are you basing this on? Sean > Link: https://github.com/ClangBuiltLinux/linux/issues/547 > Reported-by: kbuild test robot > Reviewed-by: Jeffrey Hugo > Reviewed-by: Sean Paul > Signed-off-by: Nathan Chancellor > --- > > v

Re: [Freedreno] [PATCH] drm/msm/dsi: Add parentheses to quirks check in dsi_phy_hw_v3_0_lane_settings

2019-06-19 Thread Sean Paul
_TIMINGS_QUIRK) { > ^ > () > 1 warning generated. > > Add parentheses around the bitwise AND so it is evaluated first then > negated. > > Fixes: 3dbbf8f09e83 ("drm/msm/dsi: Add old timings quirk for 10nm phy") > Link: https:

Re: [Freedreno] [PATCH 2/5] drm/msm/dpu: Integrate interconnect API in MDSS

2019-06-18 Thread Sean Paul
s case. > > Signed-off-by: Sravanthi Kollukuduru > Signed-off-by: Jayant Shekhar > Signed-off-by: Rob Clark > Acked-by: Georgi Djakov Reviewed-by: Sean Paul > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c | 49 ++-- > 1 file changed, 45 insertions(+),

Re: [Freedreno] [PATCH 1/5] drm/msm/dpu: clean up references of DPU custom bus scaling

2019-06-18 Thread Sean Paul
ror due to partial clean up > > Changes in v3: > - Condense multiple lines into a single line (Sean Paul) > > Changes in v4-v7: > - None > > Signed-off-by: Sravanthi Kollukuduru > Signed-off-by: Jayant Shekhar > Signed-off-by: Rob Clark Reviewed-

[Freedreno] [PATCH 11/13] drm/msm/dsi: Use the new setup_encoder function in attach_dsi_device

2019-06-17 Thread Sean Paul
From: Sean Paul Now that we have a function to call set_encoder_mode() for us, use it. Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/dsi/dsi.h | 2 +- drivers/gpu/drm/msm/dsi/dsi_host.c| 2 +- drivers/gpu/drm/msm/dsi/dsi_manager.c | 15 ++- 3 files changed, 4

[Freedreno] [PATCH 04/13] drm/msm/dsi_pll_10nm: Release clk hw on destroy and failure

2019-06-17 Thread Sean Paul
From: Sean Paul The 10nm pll driver didn't have any failure-path cleanup in register, and the destroy function didn't unregister any of the hardware. This patch adds both. The reason things haven't been blowing up horribly is that msm_drv has a reference count issue that keeps de

[Freedreno] [PATCH 07/13] drm/msm/dsi: Split mode_flags out of msm_dsi_host_get_panel()

2019-06-17 Thread Sean Paul
From: Sean Paul We use the flags in more places than just get_panel, so split them out into a separate function. Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/dsi/dsi.h | 4 ++-- drivers/gpu/drm/msm/dsi/dsi_host.c| 15 ++- drivers/gpu/drm/msm/dsi/dsi_manager.c | 7

[Freedreno] [PATCH 08/13] drm/msm/dsi: Don't store dsi host mode_flags in msm_dsi

2019-06-17 Thread Sean Paul
From: Sean Paul It's a bit dangerous to store the flags in msm_dsi since there's no way to tell when they're populated. Fortunately the only place that uses them is the same place that fills them. So just use a local variable and delete the struct member. Signed-off-by: Sean Pau

[Freedreno] [PATCH 12/13] drm/msm/dsi: Move dsi panel init into modeset init path

2019-06-17 Thread Sean Paul
From: Sean Paul Since deferred probe from the modeset init path now works, we can move the panel initialization from detect() into connector init. This avoids doing work in detect() and hopefully will result in a more deterministic boot sequence between devices with a dsi panel, and those with

[Freedreno] [PATCH 13/13] drm/msm/dsi: Move setup_encoder to modeset_init

2019-06-17 Thread Sean Paul
From: Sean Paul Now that the panel probe/setup is in the modeset path, we can call dsi_manager_setup_encoder() in a common place for both internal and external bridge setups. Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/dsi/dsi.c | 2 ++ drivers/gpu/drm/msm/dsi/dsi.h | 2

[Freedreno] [PATCH 09/13] drm/msm/dsi: Pull out panel init code into function

2019-06-17 Thread Sean Paul
From: Sean Paul Pull all of the panel init code out of detect() and put it in its own function. This will be useful in future patches where it's moved from detect(). Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/dsi/dsi_manager.c | 16 1 file changed, 12 insertions(

[Freedreno] [PATCH 05/13] drm/msm/dsi_pll_10nm: Remove impossible check

2019-06-17 Thread Sean Paul
From: Sean Paul While I'm in here, cut this out, pdev can't be NULL Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/dsi/pll/dsi_pll_10nm.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/msm/dsi/pll/dsi_pll_10nm.c b/drivers/gpu/drm/msm/dsi/pll/dsi_pll_10

[Freedreno] [PATCH 06/13] drm/msm: Depopulate platform on probe failure

2019-06-17 Thread Sean Paul
From: Sean Paul add_display_components() calls of_platform_populate, and we depopluate on pdev remove, but not when probe fails. So if we get a probe deferral in one of the components, we won't depopulate the platform. This causes the core to keep references to devices which should be dest

[Freedreno] [PATCH 10/13] drm/msm/dsi: Simplify the logic in msm_dsi_manager_panel_init()

2019-06-17 Thread Sean Paul
From: Sean Paul This patch moves things around a bit to be a little more readable and pulls out the set_encoder_mode() call into its own function for later use. Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/dsi/dsi_manager.c | 100 +++--- 1 file changed, 59 insertions

[Freedreno] [PATCH 03/13] drm/msm/phy/dsi_phy: Set pll to NULL in case initialization fails

2019-06-17 Thread Sean Paul
From: Sean Paul We have if (!phy->pll) checks scattered through the driver and if phy->pll is an error pointer, those checks will pass and bad things will happen :( Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 4 +++- 1 file changed, 3 insertions(+), 1 de

[Freedreno] [RESEND PATCH 01/13] drm/msm/dpu: Remove call to drm_mode_set_crtcinfo

2019-06-17 Thread Sean Paul
From: Sean Paul Now that mode_fixup has been removed, we can just rely on the call from drm_helper_probe_single_connector_modes(), Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1

[Freedreno] [RESEND PATCH 02/13] drm/msm/dpu: Fix mmu init/destroy functions

2019-06-17 Thread Sean Paul
From: Sean Paul There's a comment in _dpu_kms_hw_destroy() that reads "safe to call these more than once during shutdown", referring to _dpu_kms_mmu_destroy(). Unfortunately that's not the case, mmu_destroy will fail hard if it's called twice. So fix that function t

Re: [Freedreno] Cleanup of -Wunused-const-variable in drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c

2019-06-13 Thread Sean Paul
On Thu, Jun 13, 2019 at 4:13 PM Nathan Huckleberry wrote: > > Hey all, > > I'm looking into cleaning up ignored warnings in the kernel so we can > remove compiler flags to ignore warnings. > > There are several unused variables in dpu_formats.c > ('dpu_format_map_tile', 'dpu_format_map_p010', > 'd

[Freedreno] [PATCH] drm/msm/dpu: Remove bogus comment

2019-05-28 Thread Sean Paul
From: Sean Paul This comment doesn't make any sense, remove it. Suggested-by: Jordan Crouse Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp

[Freedreno] [PATCH] drm/msm/dpu: Fix mmu init/destroy functions

2019-05-28 Thread Sean Paul
From: Sean Paul There's a comment in _dpu_kms_hw_destroy() that reads "safe to call these more than once during shutdown", referring to _dpu_kms_mmu_destroy(). Unfortunately that's not the case, mmu_destroy will fail hard if it's called twice. So fix that function t

[Freedreno] [PATCH v2] drm/msm/dpu: Use provided drm_minor to initialize debugfs

2019-05-28 Thread Sean Paul
From: Sean Paul Instead of reaching into dev->primary for debugfs_root, use the minor passed into debugfs_init. This avoids creating a debug directory under /sys/kernel/debug/debug and instead uses /sys/kernel/debug/dri// Since we're now putting everything under */dri/, there'

[Freedreno] [PATCH] drm/msm: Re-order uninit function to work during probe defer

2019-05-24 Thread Sean Paul
From: Sean Paul If bind fails, we can call msm_drm_uninit before kms elements have been created. In this case, drm_atomic_helper_shutdown will fail since there are no drm objects. Only call drm unregistration and shutdown if drm is registered. Also while we're in here move the work

[Freedreno] [PATCH 2/2] drm/msm/dpu: Remove _dpu_debugfs_init

2019-05-24 Thread Sean Paul
From: Sean Paul Fold it into dpu_debugfs_init. Cc: Stephen Boyd Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1

[Freedreno] [PATCH 1/2] drm/msm/dpu: Use provided drm_minor to initialize debugfs

2019-05-24 Thread Sean Paul
From: Sean Paul Instead of reaching into dev->primary for debugfs_root, use the minor passed into debugfs_init. This avoids creating the debug directory under /sys/kernel/debug/ and instead creates the directory under the correct node in /sys/kernel/debug/dri// Reported-by: Stephen B

[Freedreno] [PATCH v2 1/6] drm/msm/a6xx: Avoid freeing gmu resources multiple times

2019-05-23 Thread Sean Paul
From: Sean Paul The driver checks for gmu->mmio as a sign that the device has been initialized, however there are failures in probe below the mmio init. If one of those is hit, mmio will be non-null but freed. In that case, a6xx_gmu_probe will return an error to a6xx_gpu_init which will in t

[Freedreno] [PATCH v2 5/6] drm/msm/a6xx: Drop the device reference in gmu

2019-05-23 Thread Sean Paul
From: Sean Paul of_find_device_by_node() grabs a dev reference, so make sure we clear it on error and remove. Changes in v2: - Added to the set (Jordan) Cc: Jordan Crouse Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 14 +++--- 1 file changed, 11 insertions

[Freedreno] [PATCH v2 2/6] drm/msm/a6xx: Remove duplicate irq disable from remove

2019-05-23 Thread Sean Paul
From: Sean Paul a6xx_gmu_stop() already calls this function via shutdown or force_stop, so it's not necessary to call it twice. Previously this would have knocked the irq refcount out of sync, but now with the irqs_enabled flag it's just housekeeping. Changes in v2: - None Cc: Jor

[Freedreno] [PATCH v2 3/6] drm/msm/a6xx: Check for ERR or NULL before iounmap

2019-05-23 Thread Sean Paul
From: Sean Paul pdcptr and seqptr aren't necessarily valid, check them before trying to unmap them. Changes in v2: - None Cc: Jordan Crouse Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dr

[Freedreno] [PATCH v2 4/6] drm/msm/a6xx: Remove devm calls from gmu driver

2019-05-23 Thread Sean Paul
From: Sean Paul The gmu driver is initialized and cleaned up with calls from the gpu driver. As such, the platform device stays valid after a6xx_gmu_remove is called and the device managed resources are not freed. In the case of gpu probe failures or unbind, these resources will remain managed

[Freedreno] [PATCH v2 6/6] drm/msm/a6xx: Rename a6xx_gmu_probe to a6xx_gmu_init

2019-05-23 Thread Sean Paul
From: Sean Paul This rename makes it more clear that everything initialized in the _init function must be cleaned up in a6xx_gmu_remove. This will hopefully dissuade people from using device managed resources (for reasons laid out in the previous patch). Changes in v2: - None Cc: Jordan Crouse

[Freedreno] [PATCH 5/5] drm/msm/a6xx: Rename a6xx_gmu_probe to a6xx_gmu_init

2019-05-22 Thread Sean Paul
From: Sean Paul This rename makes it more clear that everything initialized in the _init function must be cleaned up in a6xx_gmu_remove. This will hopefully dissuade people from using device managed resources (for reasons laid out in the previous patch). Signed-off-by: Sean Paul --- drivers

[Freedreno] [PATCH 3/5] drm/msm/a6xx: Check for ERR or NULL before iounmap

2019-05-22 Thread Sean Paul
From: Sean Paul pdcptr and seqptr aren't necessarily valid, check them before trying to unmap them. Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/driver

[Freedreno] [PATCH 4/5] drm/msm/a6xx: Remove devm calls from gmu driver

2019-05-22 Thread Sean Paul
From: Sean Paul The gmu driver is initalized and cleaned up with calls from the gpu driver. As such, the platform device stays valid after a6xx_gmu_remove is called and the device managed resources are not freed. In the case of gpu probe failures or unbind, these resources will remain managed

[Freedreno] [PATCH 2/5] drm/msm/a6xx: Remove duplicate irq disable from remove

2019-05-22 Thread Sean Paul
From: Sean Paul a6xx_gmu_stop() already calls this function via shutdown or force_stop, so it's not necessary to call it twice. This also knocks the irq depth count out of sync, so nice to avoid. Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 1 - 1 file chang

[Freedreno] [RESEND PATCH 1/5] drm/msm/a6xx: Avoid freeing gmu resources multiple times

2019-05-22 Thread Sean Paul
From: Sean Paul The driver checks for gmu->mmio as a sign that the device has been initialized, however there are failures in probe below the mmio init. If one of those is hit, mmio will be non-null but freed. In that case, a6xx_gmu_probe will return an error to a6xx_gpu_init which will in t

[Freedreno] [PATCH] drm/msm/a6xx: Avoid freeing gmu resources multiple times

2019-05-21 Thread Sean Paul
From: Sean Paul The driver checks for gmu->mmio as a sign that the device has been initialized, however there are failures in probe below the mmio init. If one of those is hit, mmio will be non-null but freed. In that case, a6xx_gmu_probe will return an error to a6xx_gpu_init which will in t

Re: [Freedreno] [PATCH] drm/msm: Upgrade gxpd checks to IS_ERR_OR_NULL

2019-05-15 Thread Sean Paul
On Wed, May 15, 2019 at 3:39 PM Jordan Crouse wrote: > > On Wed, May 15, 2019 at 01:00:52PM -0400, Sean Paul wrote: > > From: Sean Paul > > > > dev_pm_domain_attach_by_name() can return NULL, so we should check for > > that case when we're about to dereferenc

Re: [Freedreno] [PATCH] drm/msm/dpu: Remove duplicate header

2019-05-15 Thread Sean Paul
mdss.h" > #include "dpu_dbg.h" > -#include "dpu_kms.h" > > #define LM_OP_MODE 0x00 > #define LM_OUT_SIZE 0x04 > -- > 2.7.4 > -- Sean Paul, Software Engineer, Google / Chromium OS _

[Freedreno] [PATCH] drm/msm: Upgrade gxpd checks to IS_ERR_OR_NULL

2019-05-15 Thread Sean Paul
From: Sean Paul dev_pm_domain_attach_by_name() can return NULL, so we should check for that case when we're about to dereference gxpd. Fixes: 9325d4266afd ("drm/msm/gpu: Attach to the GPU GX power domain") Cc: Jordan Crouse Cc: Rob Clark Signed-off-by: Sean Paul --- driv

Re: [Freedreno] [PATCH v2.1 1/2] drm/msm: remove resv fields from msm_gem_object struct

2019-05-14 Thread Sean Paul
812d1b1369a5 100644 > --- a/drivers/gpu/drm/msm/msm_gem.h > +++ b/drivers/gpu/drm/msm/msm_gem.h > @@ -86,10 +86,6 @@ struct msm_gem_object { > > struct llist_node freed; > > - /* normally (resv == &_resv) except for imported bo's */ > - struct reservation_ob

Re: [Freedreno] [PATCH 5/5] drm/msm/mdp5: Use the interconnect API

2019-05-13 Thread Sean Paul
0)) Same comments here re: NULL value > + return PTR_ERR(path0); > + icc_set_bw(path0, 0, MBps_to_icc(6400)); > + > + if (!IS_ERR(path1)) > + icc_set_bw(path1, 0, MBps_to_icc(6400)); > + if (!IS_ERR(path_rot)) > + icc_set_bw(path_ro

Re: [Freedreno] [PATCH 3/5] dt-bindings: msm/disp: Introduce interconnect bindings for MDSS on SDM845

2019-05-13 Thread Sean Paul
ed-off-by: Sravanthi Kollukuduru > Signed-off-by: Jayant Shekhar > Reviewed-by: Rob Herring Reviewed-by: Sean Paul > Signed-off-by: Rob Clark > --- > Documentation/devicetree/bindings/display/msm/dpu.txt | 10 ++ > 1 file changed, 10 insertions(+) > > diff

Re: [Freedreno] [PATCH 2/5] drm/msm/dpu: Integrate interconnect API in MDSS

2019-05-13 Thread Sean Paul
t dpu_mdss_init(struct drm_device *dev) > } > dpu_mdss->mmio_len = resource_size(res); > > + ret = dpu_mdss_parse_data_bus_icc_path(dev, dpu_mdss); > + if (ret) > + return ret; > + > mp = &dpu_mdss-

<    1   2   3   4   5   6   7   8   9   >