Linux Input/HID development
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: David Heidelberg <david@ixit.cz>
Cc: Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>, Lee Jones <lee@kernel.org>,
	Stephen Boyd <sboyd@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Abel Vesa <abelvesa@kernel.org>,
	Subbaraman Narayanamurthy
	<subbaraman.narayanamurthy@oss.qualcomm.com>,
	Kamal Wadhwa <kamal.wadhwa@oss.qualcomm.com>,
	Fenglin Wu <fenglin.wu@oss.qualcomm.com>,
	Casey Connolly <casey@connolly.tech>,
	linux-arm-msm@vger.kernel.org, linux-input@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	mfd@lists.linux.dev, phone-devel@vger.kernel.org
Subject: Re: [PATCH v8 3/9] Input: qcom-pmi8998-haptics - Add Qualcomm PMI8998 haptics driver
Date: Tue, 01 Dec 2026 11:54:42 -0800	[thread overview]
Message-ID: <a554467d03ce6d10b7da736c2e1332c6@gmail.com> (raw)
In-Reply-To: <fc9d0000-5a7f-4b1e-8ec9-3cefd185350f@ixit.cz>

On Tue, Dec 01, 2026 at 10:57:47AM +0100, David Heidelberg wrote:
> On 01/12/2026 05:48, Dmitry Torokhov wrote:
> > The biggest issue here is that the driver grew to over 2000 lines mostly
> > because it uses input_ff_create() and implements its own asynchronous FF
> > scheduler (effect array, request queue, spinlock, and multiple work
> > items). Since this hardware has no autonomous effect memory or replay
> > timer, please switch to input_ff_create_memless() like the other
> > vibrator drivers in drivers/input/misc/. That gives proper handling of
> > replay.delay, repeat counts, FF_GAIN, envelopes, and effect combining,
> > avoids hand-rolling partial FF_SINE and FF_CONSTANT support, and drops
> > the custom queue and work races (including the work()/erase() race
> > Sashiko pointed out).
>
> Hi Dmitry.
>
> What about our waveform buffer the HW has, I wouldn't be able to utilize it with 
> ff-memless, if I'm correct. While I currently dislike the extra complexity, the 
> problem why I went with this approach was mostly because ff-memless couldn't do 
> much.

Right, the question is if we actually need to support this unless we
agree on and document what custom waveform means and whether there are
real users of it. If not, then I do not think it makes sense to keep the
custom effect scheduler that is also limited.

Also, why do we need qcom,play-mode in DT at all if the hardware can
switch modes per effect? Are there boards that can't use direct mode for
normal effects?

>
> > 
> > As a heads up, I am looking into reworking the FF core and ff-memless to
> > better handle suspend, resume, and "slow" (sleepable) memoryless
> > devices. There is no need to wait on that work, though: a slim driver
> > built on the existing input_ff_create_memless() with a single
> > work_struct will be straightforward to adapt once those changes land.
>
> If I go for the memless, are there planned at least some changes to, f.e. use 
> the waveform buffers, e.g. opposite of memless?

No, my changes are only about suspend/resume and sleepable playback for
memoryless devices which should simplify this driver quite a bit.
If we really need to support FF_CUSTOM then we'll have to stay with
input_ff_create() (or move over to it at a later time).

Thanks.

-- 
Dmitry

  reply	other threads:[~2026-12-01 19:54 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30  0:13 [PATCH v8 0/9] input: Add support for the Qualcomm PMI8998 and PM660 haptics David Heidelberg via B4 Relay
2026-11-30  0:13 ` [PATCH v8 1/9] dt-bindings: input: Add Qualcomm PMI8998 / " David Heidelberg via B4 Relay
2026-11-30  0:22   ` sashiko-bot
2026-11-30 13:59   ` Rob Herring (Arm)
2026-11-30  0:13 ` [PATCH v8 2/9] dt-bindings: mfd: qcom,spmi-pmic: Allow the PMI8998 haptics child node David Heidelberg via B4 Relay
2026-11-30 13:59   ` Rob Herring (Arm)
2026-11-30  0:13 ` [PATCH v8 3/9] Input: qcom-pmi8998-haptics - Add Qualcomm PMI8998 haptics driver David Heidelberg via B4 Relay
2026-11-30  0:26   ` sashiko-bot
2026-11-30  9:33   ` Uwe Kleine-König
2026-11-30 10:36   ` Alexey Minnekhanov
2026-11-30 11:36     ` Uwe Kleine-König
2026-11-30 15:21   ` Andrey Derkach
2026-11-30 16:11     ` David Heidelberg
2026-11-30 16:16       ` Andrey Derkach
2026-11-30 16:26         ` Andrey Derkach
2026-11-30 23:56         ` David Heidelberg
2026-12-01  4:48   ` Dmitry Torokhov
2026-12-01  9:57     ` David Heidelberg
2026-12-01 19:54       ` Dmitry Torokhov [this message]
2026-11-30  0:13 ` [PATCH v8 4/9] arm64: dts: qcom: pmi8998: Add haptics node David Heidelberg via B4 Relay
2026-11-30  0:13 ` [PATCH v8 5/9] arm64: dts: qcom: sdm845-oneplus: Enable haptics David Heidelberg via B4 Relay
2026-11-30  0:13 ` [PATCH v8 6/9] arm64: dts: qcom: sdm845-xiaomi-beryllium: " David Heidelberg via B4 Relay
2026-11-30  0:13 ` [PATCH v8 7/9] arm64: dts: qcom: sdm845-shift-axolotl: " David Heidelberg via B4 Relay
2026-11-30  0:13 ` [PATCH v8 8/9] arm64: dts: qcom: pm660: Add haptics node David Heidelberg via B4 Relay
2026-11-30 15:21   ` Andrey Derkach
2026-11-30  0:13 ` [PATCH v8 9/9] arm64: dts: qcom: sdm660-xiaomi-lavender: Enable haptics David Heidelberg via B4 Relay
2026-11-30 10:38   ` Alexey Minnekhanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a554467d03ce6d10b7da736c2e1332c6@gmail.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=abelvesa@kernel.org \
    --cc=andersson@kernel.org \
    --cc=casey@connolly.tech \
    --cc=conor+dt@kernel.org \
    --cc=david@ixit.cz \
    --cc=devicetree@vger.kernel.org \
    --cc=fenglin.wu@oss.qualcomm.com \
    --cc=kamal.wadhwa@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mfd@lists.linux.dev \
    --cc=phone-devel@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=subbaraman.narayanamurthy@oss.qualcomm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox