All of lore.kernel.org
 help / color / mirror / Atom feed
* Firmware for staging atomisp driver
@ 2017-05-28 12:30 Hans de Goede
  2017-05-30 16:25 ` Alan Cox
  2017-06-02 20:28 ` Hans de Goede
  0 siblings, 2 replies; 4+ messages in thread
From: Hans de Goede @ 2017-05-28 12:30 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Greg Kroah-Hartman, Alan Cox; +Cc: linux-media, devel

Hi All,

I've been trying to get the atomisp driver from staging to work
on a couple of devices I have.

I started with an Asus T100TA after fixing 2 oopses in the sensor
driver there I found out that the BIOS does not allow to put the
ISP in PCI mode and that there is no code to drive it in ACPI
enumerated mode.

So I moved to a generic Insyde T701 tablet which does allow
this. After fixing some more sensor driver issues there I was
ready to actually load the atomisp driver, but I could not
find the exact firmware required, I did find a version which
is close: "irci_stable_candrpv_0415_20150423_1753"
and tried that but that causes the atomisp driver to explode
in a backtrace which contains atomisp_load_firmware() so that
one seems no good.

Can someone help me to get the right firmware ?

The TODO says: "can also be extracted from the upgrade kit"
about the firmware files, but it is not clear to me what /
where the "upgrade kit" is.

More in general it would be a good idea if someone inside Intel
would try to get permission to add the firmware to linux-firmware.

Anyways I will send out the patches I've currently, once I've
the right firmware I will continue working on this.

Regards,

Hans

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Firmware for staging atomisp driver
  2017-05-28 12:30 Firmware for staging atomisp driver Hans de Goede
@ 2017-05-30 16:25 ` Alan Cox
  2017-06-02 20:28 ` Hans de Goede
  1 sibling, 0 replies; 4+ messages in thread
From: Alan Cox @ 2017-05-30 16:25 UTC (permalink / raw)
  To: Hans de Goede, Mauro Carvalho Chehab, Greg Kroah-Hartman
  Cc: linux-media, devel

On Sun, 2017-05-28 at 14:30 +0200, Hans de Goede wrote:
> I started with an Asus T100TA after fixing 2 oopses in the sensor
> driver there I found out that the BIOS does not allow to put the
> ISP in PCI mode and that there is no code to drive it in ACPI
> enumerated mode.

In ACPI mode it's enumerated as part of the GPU but beyond that I don't
know how it works and haven't been able to find out. I am guessing at
this point that the extra node in the acpidump under the GPU gives the
base address, but no idea where the IRQ comes from. Power management on
the BYT devices via PCI is broken anyway so that bit shouldn't matter.



> So I moved to a generic Insyde T701 tablet which does allow
> this. After fixing some more sensor driver issues there I was
> ready to actually load the atomisp driver, but I could not
> find the exact firmware required, I did find a version which
> is close: "irci_stable_candrpv_0415_20150423_1753"
> and tried that but that causes the atomisp driver to explode
> in a backtrace which contains atomisp_load_firmware() so that
> one seems no good.

The firmware has to exactly match. If you look in the atomisp code
you'll see that there are offsets which basically appear to be memory
addresses in the firmware as built that time.

> Can someone help me to get the right firmware ?

Yep.

> The TODO says: "can also be extracted from the upgrade kit"
> about the firmware files, but it is not clear to me what /
> where the "upgrade kit" is.

The Android upgrade kit for your device. So your platforms equivalent
of

https://www.asus.com/Tablets/ASUS_MeMO_Pad_7_ME176C/HelpDesk_Download/


> More in general it would be a good idea if someone inside Intel
> would try to get permission to add the firmware to linux-firmware.

I spent 6 months trying, but even though you can go to your product
vendors website and download it I've not been able to 8(.

> 
> Anyways I will send out the patches I've currently, once I've
> the right firmware I will continue working on this.

Really appreciate the work you are doing on this.

Alan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Firmware for staging atomisp driver
  2017-05-28 12:30 Firmware for staging atomisp driver Hans de Goede
  2017-05-30 16:25 ` Alan Cox
@ 2017-06-02 20:28 ` Hans de Goede
  2017-06-05 16:46   ` Alan Cox
  1 sibling, 1 reply; 4+ messages in thread
From: Hans de Goede @ 2017-06-02 20:28 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Greg Kroah-Hartman, Alan Cox; +Cc: linux-media, devel

Hi,

On 05/28/2017 02:30 PM, Hans de Goede wrote:
> Hi All,
> 
> I've been trying to get the atomisp driver from staging to work
> on a couple of devices I have.
> 
> I started with an Asus T100TA after fixing 2 oopses in the sensor
> driver there I found out that the BIOS does not allow to put the
> ISP in PCI mode and that there is no code to drive it in ACPI
> enumerated mode.
> 
> So I moved to a generic Insyde T701 tablet which does allow
> this. After fixing some more sensor driver issues there I was
> ready to actually load the atomisp driver, but I could not
> find the exact firmware required, I did find a version which
> is close: "irci_stable_candrpv_0415_20150423_1753"
> and tried that but that causes the atomisp driver to explode
> in a backtrace which contains atomisp_load_firmware() so that
> one seems no good.

Ok, so it turns out that the explosion was not a probem with
a wrong firmware version, but rather another atomisp code
bug. According to this patch:

https://github.com/01org/ProductionKernelQuilts/blob/master/uefi/cht-m1stable/patches/cam-0418-atomisp2-css2401-and-2401_legacy-irci_stable_candrpv.patch

The irci_stable_candrpv_0415_20150423_1753 version I
have and the irci_stable_candrpv_0415_20150521_0458
version expected are fully compatible.

So I'e focussed on fixing the crash and that was easy, see
the patch I just send.

Then I hit another bunch of crashes which all turn out to
be due to races with udev opening /dev/video# nodes for probing
before the driver is ready to handle this because the driver
registers the v4l2 devices too soon. I've hacked around this
for now:

https://github.com/jwrdegoede/linux-sunxi/commit/88c9c248e6e0f86d547ea8441e16b0e8b4c951c8

And with this hack the driver loads without issues, giving
me 10 /dev/video# devices. So I tried this app:

https://github.com/jfwells/linux-asus-t100ta/tree/master/webcam/atomisp_testapp

On a number of the v4l devices which leads to yet more oopses.

So I'm starting to wonder, does anyone have this driver working
(in its current form in 4.12-rc3 drivers/staging) at all ?

I'm asking  because that is hard to believe given e.g. the recursion bug
I've just fixed.

Can someone provide step-by-step instructions for how to get this
driver working?

I'm not expecting all userspace apps to just work, but at least a userspace example
given a picture from the camera would be very helpful in further developing
this driver.

Regards,

Hans

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Firmware for staging atomisp driver
  2017-06-02 20:28 ` Hans de Goede
@ 2017-06-05 16:46   ` Alan Cox
  0 siblings, 0 replies; 4+ messages in thread
From: Alan Cox @ 2017-06-05 16:46 UTC (permalink / raw)
  To: Hans de Goede
  Cc: Mauro Carvalho Chehab, Greg Kroah-Hartman, Alan Cox, linux-media, devel

> I'm asking  because that is hard to believe given e.g. the recursion bug
> I've just fixed.

It was kind of working yes (with libxcam and a simple test tool). The
recursion one was my fault. I didn't mean that one to go upstream as I
was still debugging it. The older code handled it right until I moved the
test.

> Can someone provide step-by-step instructions for how to get this
> driver working?

Need to restore my backup to get the set up I had (I broke my memopad
somewhat with one of my tests and it ate it's disk).

But basically I was using

https://github.com/01org/libxcam/wiki/Tests

Alan

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-06-05 16:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-28 12:30 Firmware for staging atomisp driver Hans de Goede
2017-05-30 16:25 ` Alan Cox
2017-06-02 20:28 ` Hans de Goede
2017-06-05 16:46   ` Alan Cox

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.