Re: [PATCH v4 2/5] drm/i915/hpd: Add support for blocking the IRQ handling on an HPD pin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 28, 2025 at 07:25:00PM +0200, Ville Syrjälä wrote:
> On Wed, Feb 26, 2025 at 07:35:04PM +0200, Imre Deak wrote:
> > [...]
> >  static void i915_digport_work_func(struct work_struct *work)
> >  {
> > -	struct drm_i915_private *dev_priv =
> > -		container_of(work, struct drm_i915_private, display.hotplug.dig_port_work);
> > +	struct intel_display *display =
> > +		container_of(work, struct intel_display, hotplug.dig_port_work);
> > +	struct drm_i915_private *dev_priv = to_i915(display->drm);
> > +	struct intel_hotplug *hotplug = &display->hotplug;
> >  	u32 long_port_mask, short_port_mask;
> >  	struct intel_encoder *encoder;
> > +	u32 blocked_ports;
> >  	u32 old_bits = 0;
> >  
> >  	spin_lock_irq(&dev_priv->irq_lock);
> > -	long_port_mask = dev_priv->display.hotplug.long_port_mask;
> > -	dev_priv->display.hotplug.long_port_mask = 0;
> > -	short_port_mask = dev_priv->display.hotplug.short_port_mask;
> > -	dev_priv->display.hotplug.short_port_mask = 0;
> > +
> > +	blocked_ports = get_blocked_hpd_ports(display);
> > +	long_port_mask = hotplug->long_port_mask & ~blocked_ports;
> > +	hotplug->long_port_mask &= ~long_port_mask;
> > +	short_port_mask = hotplug->short_port_mask & ~blocked_ports;
> > +	hotplug->short_port_mask &= ~short_port_mask;
> 
> Why are we even tracking things as port masks for this? 

I can't see a reason for it (tracking as HPD pins would still allow
handling the encoders sharing the pin properly afaics).

> Wouldn't everything be a bit simpler if we just tracked
> the pins for this as well?

Yes, that simplifies it, thanks for the idea. Imo the change itself is
simple enough:
https://github.com/ideak/linux/commit/056801d

based on which this patchset would simplify to
https://github.com/ideak/linux/commits/hpd-block

removing all the pin to port conversions (both in this and the last
patch). Jani, would this be ok with you?

--Imre



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux