Re: svn commit: r351009 - head/sys/compat/linuxkpi/common/include/linux
On August 14, 2019 2:15:22 PM PDT, Niclas Zeising wrote: >On 2019-08-14 21:24, Cy Schubert wrote: >> On August 14, 2019 12:06:24 PM PDT, Hans Petter Selasky > wrote: >>> On 2019-08-14 21:00, Cy Schubert wrote: John's patch to drm-current-kmod (ports r508877) works! This broke drm-current-kmod. >>> >>> You need to update the port. This patch should have been tested too. >>> >>> Did you try that first? >>> >>> --HPS >> >> The port is up to date. Sorry for not attaching output. I was in a >rush to get back to $JOB. I'll rerun it tonight. >> >> > >Ports should be updated with a fix now, sorry about that. >Regards NP. I just noticed the commit email. I'll give it a spin when I get home. Thanks for all your work maintaining drm for us. -- Pardon the typos and autocorrect, small keyboard in use. Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r351009 - head/sys/compat/linuxkpi/common/include/linux
On August 14, 2019 12:24:19 PM PDT, Cy Schubert wrote: >On August 14, 2019 12:06:24 PM PDT, Hans Petter Selasky > wrote: >>On 2019-08-14 21:00, Cy Schubert wrote: >>> John's patch to drm-current-kmod (ports r508877) works! This broke >>> drm-current-kmod. >> >>You need to update the port. This patch should have been tested too. >> >>Did you try that first? >> >>--HPS > >The port is up to date. Sorry for not attaching output. I was in a rush >to get back to $JOB. I'll rerun it tonight. I see a ports commit that looks like it will fix this. I'll give it a spin when I get home tonight. -- Pardon the typos and autocorrect, small keyboard in use. Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r351009 - head/sys/compat/linuxkpi/common/include/linux
On 2019-08-14 21:24, Cy Schubert wrote: On August 14, 2019 12:06:24 PM PDT, Hans Petter Selasky wrote: On 2019-08-14 21:00, Cy Schubert wrote: John's patch to drm-current-kmod (ports r508877) works! This broke drm-current-kmod. You need to update the port. This patch should have been tested too. Did you try that first? --HPS The port is up to date. Sorry for not attaching output. I was in a rush to get back to $JOB. I'll rerun it tonight. Ports should be updated with a fix now, sorry about that. Regards -- Niclas Zeising ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r351009 - head/sys/compat/linuxkpi/common/include/linux
On August 14, 2019 12:06:24 PM PDT, Hans Petter Selasky wrote: >On 2019-08-14 21:00, Cy Schubert wrote: >> John's patch to drm-current-kmod (ports r508877) works! This broke >> drm-current-kmod. > >You need to update the port. This patch should have been tested too. > >Did you try that first? > >--HPS The port is up to date. Sorry for not attaching output. I was in a rush to get back to $JOB. I'll rerun it tonight. -- Pardon the typos and autocorrect, small keyboard in use. Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r351009 - head/sys/compat/linuxkpi/common/include/linux
On 2019-08-14 21:00, Cy Schubert wrote: John's patch to drm-current-kmod (ports r508877) works! This broke drm-current-kmod. You need to update the port. This patch should have been tested too. Did you try that first? --HPS ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r351009 - head/sys/compat/linuxkpi/common/include/linux
In message <201908140936.x7e9aqac069...@repo.freebsd.org>, Hans Petter Selasky writes: > Author: hselasky > Date: Wed Aug 14 09:36:25 2019 > New Revision: 351009 > URL: https://svnweb.freebsd.org/changeset/base/351009 > > Log: > Implement pci_enable_msi() and pci_disable_msi() in the LinuxKPI. > This patch makes the DRM graphics driver in ports usable on aarch64. > > Submitted by: Greg V > Differential Revision: https://reviews.freebsd.org/D21008 > MFC after: 1 week > Sponsored by: Mellanox Technologies > > Modified: > head/sys/compat/linuxkpi/common/include/linux/device.h > head/sys/compat/linuxkpi/common/include/linux/interrupt.h > head/sys/compat/linuxkpi/common/include/linux/pci.h > > Modified: head/sys/compat/linuxkpi/common/include/linux/device.h > = > = > --- head/sys/compat/linuxkpi/common/include/linux/device.hWed Aug 14 06:4 > 1:22 2019 (r351008) > +++ head/sys/compat/linuxkpi/common/include/linux/device.hWed Aug 14 09:3 > 6:25 2019 (r351009) > @@ -110,8 +110,8 @@ struct device { > void*driver_data; > unsigned intirq; > #define LINUX_IRQ_INVALID 65535 > - unsigned intmsix; > - unsigned intmsix_max; > + unsigned intirq_start; > + unsigned intirq_end; > const struct attribute_group **groups; > struct fwnode_handle *fwnode; > > > Modified: head/sys/compat/linuxkpi/common/include/linux/interrupt.h > = > = > --- head/sys/compat/linuxkpi/common/include/linux/interrupt.h Wed Aug 14 06:4 > 1:22 2019 (r351008) > +++ head/sys/compat/linuxkpi/common/include/linux/interrupt.h Wed Aug 14 09:3 > 6:25 2019 (r351009) > @@ -55,9 +55,11 @@ struct irq_ent { > static inline int > linux_irq_rid(struct device *dev, unsigned int irq) > { > - if (irq == dev->irq) > + /* check for MSI- or MSIX- interrupt */ > + if (irq >= dev->irq_start && irq < dev->irq_end) > + return (irq - dev->irq_start + 1); > + else > return (0); > - return irq - dev->msix + 1; > } > > extern void linux_irq_handler(void *); > > Modified: head/sys/compat/linuxkpi/common/include/linux/pci.h > = > = > --- head/sys/compat/linuxkpi/common/include/linux/pci.h Wed Aug 14 06:4 > 1:22 2019 (r351008) > +++ head/sys/compat/linuxkpi/common/include/linux/pci.h Wed Aug 14 09:3 > 6:25 2019 (r351009) > @@ -228,6 +228,7 @@ struct pci_dev { > unsigned intdevfn; > uint32_tclass; > uint8_t revision; > + boolmsi_enabled; > }; > > static inline struct resource_list_entry * > @@ -262,7 +263,7 @@ linux_pci_find_irq_dev(unsigned int irq) > spin_lock(_lock); > list_for_each_entry(pdev, _devices, links) { > if (irq == pdev->dev.irq || > - (irq >= pdev->dev.msix && irq < pdev->dev.msix_max)) { > + (irq >= pdev->dev.irq_start && irq < pdev->dev.irq_end)) { > found = >dev; > break; > } > @@ -424,10 +425,25 @@ pci_disable_msix(struct pci_dev *pdev) >* linux_pci_find_irq_dev() does no longer see them by >* resetting their references to zero: >*/ > - pdev->dev.msix = 0; > - pdev->dev.msix_max = 0; > + pdev->dev.irq_start = 0; > + pdev->dev.irq_end = 0; > } > > +#define pci_disable_msi(pdev) \ > + linux_pci_disable_msi(pdev) > + > +static inline void > +linux_pci_disable_msi(struct pci_dev *pdev) > +{ > + > + pci_release_msi(pdev->dev.bsddev); > + > + pdev->dev.irq_start = 0; > + pdev->dev.irq_end = 0; > + pdev->irq = pdev->dev.irq; > + pdev->msi_enabled = false; > +} > + > unsigned longpci_resource_start(struct pci_dev *pdev, int bar); > unsigned longpci_resource_len(struct pci_dev *pdev, int bar); > > @@ -562,10 +578,10 @@ pci_enable_msix(struct pci_dev *pdev, struct msix_entr > return avail; > } > rle = linux_pci_get_rle(pdev, SYS_RES_IRQ, 1); > - pdev->dev.msix = rle->start; > - pdev->dev.msix_max = rle->start + avail; > + pdev->dev.irq_start = rle->start; > + pdev->dev.irq_end = rle->start + avail; > for (i = 0; i < nreq; i++) > - entries[i].vector = pdev->dev.msix + i; > + entries[i].vector = pdev->dev.irq_start + i; > return (0); > } > > @@ -593,6 +609,32 @@ pci_enable_msix_range(struct pci_dev *dev, struct msix > } > } while (rc); > return (nvec); > +} > + > +#define pci_enable_msi(pdev) \ > + linux_pci_enable_msi(pdev) > + > +static inline int > +pci_enable_msi(struct pci_dev *pdev) > +{ > + struct resource_list_entry *rle;