30 Apr, 2018

1 commit


27 Apr, 2018

8 commits


26 Apr, 2018

6 commits

  • there are 2 test failed on 8QXP FB. CL151757 fixed bug #20196,
    for image objects using host ptr, set the cacheable flag correctly.

    merged CL151774 fix build error cause by CL151757.

    Signed-off-by: Xianzhong
    (cherry picked from commit 0be7546b8798645cea95e7dc935c43380f763458)

    Xianzhong
     
  • When pm is running power ON to OFF (not broadcast), gckCOMMAND_Stall is called for synchronization.
    But it does not blocks more events.

    Signed-off-by: Xianzhong
    (cherry picked from commit 1e2fae3d33a5e4b0690722dc112fd5a77eb90eac)

    Xianzhong
     
  • When power ON to other mode with broadcast (SUSPEND_BROADCAST,
    IDLE_BROADCAST, OFF_BROADCAST), command->powerSemaphore is acquired after check idle.
    code sequence:
    check commit atom
    check idle
    >>> at this point, other thread may have new commits at this
    >>> point.
    Acquire command->powerSemaphore
    ... do clock off

    This can cause unexpected interrupts after clock OFF or power
    OFF.

    To fix: try to acquire powerSemaphore before check commit atom,
    abort when failure, because command commit is in progress.

    fix bug #19216, #19230.

    Signed-off-by: Xianzhong
    (cherry picked from commit 5228271314e8f575e4bbd9d3087c220b6a344b7d)

    Xianzhong
     
  • When pm (SetPowerManagementState) is running power ON to
    SUSPEND_BROADCAST, it only checks wait-link FE, but not Async FE. Clock
    can be off when read AsyncFE Acknowledge register and other.

    pm thread:
    ...
    check commit atom ok
    >> check idle OK
    (former stopIsr before cl144673 is here)
    set GPU clock off
    ...

    isr:
    gcmkONERROR(ReadRegister(AQ_INTR_ACKNOWLEDGE_Address));
    gckEVENT_Interrupt
    >>> here, at this point, all interrupt comes, check idle in
    >>> pm thread can pass.
    gcmkONERROR(ReadRegister(AQ_INTR_ACKNOWLEDGE_EX_Address));
    gckFE_UpdateAvaiable -> ReadRegister(GCREG_FE_ASYNC_STATUS_Address)

    If gcmkONERROR(ReadRegister(AQ_INTR_ACKNOWLEDGE_EX_Address))
    fail of clock off, then gckHARDWARE_Interrupt fails. In isrRoutine, it
    won't wake up threadRoutine. Then it's stuck!
    ReadRegister(GCREG_FE_ASYNC_STATUS_Address) failure can cause
    unexpected behavior, too.

    Former stopIsr (free_irq, before cl144673) can remove isr before
    GPU clock off. So the issue is hidden.

    To fix:
    1. We should return success when either FE or AsyncFE reports
    correct interrupts, so that isr can wake up threadRoutine for either FE.
    That means, only need return ERROR when both FEs reports ERROR.
    2. Add check for status of
    ReadRegister(GCREG_FE_ASYNC_STATUS_Address).

    Fix bug #19216, #19230.

    merged BUG#19216 BUG#19230 CL152073 add missing part for CL151955

    Signed-off-by: Xianzhong
    (cherry picked from commit 274841e0b05704726e28cc10185b6fb5973969f4)

    Xianzhong
     
  • 1. slightly increate performance for interrupt handler
    2. refine powerMutex lock
    3. remove obsolete power management mode
    4. code refinement preparing fix for bug #19216, #19230

    Signed-off-by: Xianzhong
    (cherry picked from commit e002022c3143b3e266af893b02bb913e3d156c54)

    Xianzhong
     
  • Using uninitialized value minf when calling snprintf.
    Initilize it to fix.

    Date: 25th Apr, 2018
    Signed-off-by: Yuchou Gan

    Yuchou Gan
     

25 Apr, 2018

3 commits

  • Currently, WiFi only work on SDIO2.0 mode, so add property
    "no-1-8-v", otherwise following warning log will be print

    sdhci-esdhc-imx 40380000.usdhc: could not get ultra high speed state, work on normal mode

    The regulator reg_vsd_3v3 and reg_sd1_vmmc has the same
    regulator name, so will trigger the following error log:

    VSD_3V3: Failed to create debugfs directory

    So change the regulator name of reg_sd1_vmmc.

    According to the spec suggestion, ibe need to be enabled
    for usdhc clock pin, and clock is better to pull down.

    Signed-off-by: Haibo Chen
    (cherry picked from commit b62dd733a100e35e93543642149bcf8b61e13242)

    Haibo Chen
     
  • When CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=n, the call path
    hrtimer_reprogram -> clockevents_program_event ->
    clockevents_program_min_delta will not retry if the clock event driver
    returns -ETIME.

    If the driver could not satisfy the program_min_delta for any reason, the
    lack of a retry means the CPU may not receive a tick interrupt, potentially
    until the counter does a full period. This leads to rcu_sched timeout
    messages as the stalled CPU is detected by other CPUs, and other issues if
    the CPU is holding locks or other resources at the point at which it
    stalls.

    There have been a couple of observed mechanisms through which a clock event
    driver could not satisfy the requested min_delta and return -ETIME.

    With the MIPS GIC driver, the shared execution resource within MT cores
    means inconventient latency due to execution of instructions from other
    hardware threads in the core, within gic_next_event, can result in an event
    being set in the past.

    Additionally under virtualisation it is possible to get unexpected latency
    during a clockevent device's set_next_event() callback which can make it
    return -ETIME even for a delta based on min_delta_ns.

    It isn't appropriate to use MIN_ADJUST in the virtualisation case as
    occasional hypervisor induced high latency will cause min_delta_ns to
    quickly increase to the maximum.

    Instead, borrow the retry pattern from the MIN_ADJUST case, but without
    making adjustments. Retry up to 10 times, each time increasing the
    attempted delta by min_delta, before giving up.

    [ Matt: Reworked the loop and made retry increase the delta. ]

    Signed-off-by: James Hogan
    Signed-off-by: Matt Redfearn
    Signed-off-by: Thomas Gleixner
    Cc: linux-mips@linux-mips.org
    Cc: Daniel Lezcano
    Cc: "Martin Schwidefsky"
    Cc: James Hogan
    Link: https://lkml.kernel.org/r/1508422643-6075-1-git-send-email-matt.redfearn@mips.com

    James Hogan
     
  • Dump the error info only when there is an error. If the gcdALLOC_ON_FAULT is not enabled, still need to check
    the HW status to decide whether to dump the exception info or not

    Signed-off-by: Ella Feng
    Reviewed-by: Xianzhong Li

    Chenyan Feng
     

24 Apr, 2018

3 commits


20 Apr, 2018

6 commits


19 Apr, 2018

1 commit

  • Incorrect condition check causes -ETIME return only
    happen when next event is equal to current counter, and
    it would cause various system issue like RCU stalls etc.,
    the correct case should be whenever next event is less
    than current counter, -ETIME should be returned. Correct
    the type cast during return condition check to make it
    work right.

    Signed-off-by: Anson Huang
    Reviewed-by: Bai Ping

    Anson Huang
     

18 Apr, 2018

2 commits

  • Signed-off-by: Franck LENORMAND
    (cherry picked from commit 0b122f882429a82274fc99439b5d73986b731672)

    Franck LENORMAND
     
  • Fix the following warnings in CAAM SM:

    drivers/crypto/caam/sm_store.c: In function 'blacken_key_jobdesc':
    drivers/crypto/caam/sm_store.c:141:19: warning: cast from pointer
    to integer of different size [-Wpointer-to-int-cast]
    tmpdesc[idx++] = (u32)key;
    ^
    drivers/crypto/caam/sm_store.c:153:19: warning: cast from pointer
    to integer of different size [-Wpointer-to-int-cast]
    tmpdesc[idx++] = (u32)key;
    ^
    drivers/crypto/caam/sm_store.c: In function 'blob_encap_jobdesc':
    drivers/crypto/caam/sm_store.c:274:19: warning: cast from pointer
    to integer of different size [-Wpointer-to-int-cast]
    tmpdesc[idx++] = (u32)secretbuf;
    ^
    drivers/crypto/caam/sm_store.c: In function 'blob_decap_jobdesc':
    drivers/crypto/caam/sm_store.c:390:19: warning: cast from pointer
    to integer of different size [-Wpointer-to-int-cast]
    tmpdesc[idx++] = (u32)outbuf;
    ^
    drivers/crypto/caam/sm_store.c: In function 'slot_get_base':
    drivers/crypto/caam/sm_store.c:569:9: warning: cast from pointer
    to integer of different size [-Wpointer-to-int-cast]
    return (u32)(ksdata->base_address);
    ^
    drivers/crypto/caam/sm_store.c: In function 'sm_keystore_slot_load':
    drivers/crypto/caam/sm_store.c:789:6:
    warning: unused variable 'i' [-Wunused-variable]
    u32 i;

    Signed-off-by: Franck LENORMAND
    (cherry picked from commit b6bd87e624bbe30b9be19c3f8ccb8f5526e4186b)

    Franck LENORMAND
     

17 Apr, 2018

2 commits

  • On the i.MX7ULP EVK Rev.B baord, the backlight brigntness driver circuit
    is updated. A RC filter is added on the MP3301's EN pin. So the PWM's frequency
    should be change to 20KHZ. for EN pin, A DC voltage from 0.7V to 1.4V can control
    the LED current from 0% to 100%. the backlight brightness level also need to be
    updated.

    Signed-off-by: Bai Ping
    Reviewed-by: Anson Huang
    (cherry picked from commit 82555e15a5f958c09492d0103425dc30bc7cd927)

    Bai Ping
     
  • In i.MX7ULP TPM PWM module, it has a pre-scale divider,
    this divider setting is missed, so fix it.

    Signed-off-by: Bai Ping
    Reviewed-by: Anson Huang
    (cherry picked from commit 3ffd915e44320a8142698ca3f6e19c30ec434f61)

    Bai Ping
     

13 Apr, 2018

3 commits

  • The default display interface on i.MX7ULP EVK board is the HDMI
    interface, and a hardware rework is required to support the MIPI
    panel. To match the current board design, added the HDMI node in
    the imx7ulp-evk.dts and created a new file named imx7ulp-evk-mipi.dts.

    Signed-off-by: Shenwei Wang
    Reviewed-by: Andy Duan

    Shenwei Wang
     
  • commit a56e6e190015 ("MLK-17961 dts: imx7ulp-evk: add non-removable
    property for wifi sdio") add non-removable property, sd1 slot on
    base board share the same usdhc with wifi, and the sd1 slot support
    card detect, so for sd1 slot, need to remove the non-removable
    property.

    Signed-off-by: Haibo Chen
    Reviewed-by: Andy Duan
    (cherry picked from commit 2a40d8123aff4b4fb7a5cbf286d0c308a42c2fc7)

    Haibo Chen
     
  • This patch fix resume failure in freeze suspend mode on i.mx7ULP
    ("echo freeze > /sys/power/state") while pressing onoff key or
    enabling rtc alarm wakeup. In freeze mode, kernel can only be woken
    up by drivers which register wakup source such as 'device_init_wakeup'
    or 'irq_set_irq_wake', otherwise, kernel will wait for irq handler
    freeze_wake(). Unfortunately, our NMI interrupt which used to wakeup
    A7 by M4 is not a common device and request irq as 'IRQF_NO_SUSPEND'
    which means feeze_wake() never get chance to run while wakeup by any
    event from M4 such as RTC, ONOFF. In this case, use pm_system_wakeup()
    instead in NMI interrupt handle to trigger freeze_wake() directly.

    Signed-off-by: Robin Gong
    Reviewed-by: Anson Huang

    Robin Gong
     

12 Apr, 2018

5 commits