1. 08 Sep, 2020 21 commits
    • Vaibhav Gupta's avatar
      fbdev: arkfb: use generic power management · a91df118
      Vaibhav Gupta authored
      Drivers should do only device-specific jobs. But in general, drivers using
      legacy PCI PM framework for .suspend()/.resume() have to manage many PCI
      PM-related tasks themselves which can be done by PCI Core itself. This
      brings extra load on the driver and it directly calls PCI helper functions
      to handle them.
      
      Switch to the new generic framework by updating function signatures and
      define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove
      unnecessary calls to the PCI Helper functions along with the legacy
      .suspend & .resume bindings.
      
      The ark_pci_suspend() is not designed to function in the case of Freeze.
      Thus, the code checked for "if (state.event == PM_EVENT_FREEZE....)". This
      is because, in the legacy framework, this callback was invoked even in the
      event of Freeze. Hence, added the load of unnecessary function-call.
      
      The goal can be achieved by binding the callback with only ".suspend" and
      ".poweroff" in the "ark_pci_pm_ops" const variable. This also avoids the
      step of checking "state.event == PM_EVENT_FREEZE" every time the callback
      is invoked.
      Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Cc: Bjorn Helgaas <helgaas@kernel.org>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Bjorn Helgaas <bjorn@helgaas.com>
      Cc: Vaibhav Gupta <vaibhav.varodek@gmail.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Andres Salomon <dilinger@queued.net>
      CC: Antonino Daplas <adaplas@gmail.com>
      Cc: Shuah Khan <skhan@linuxfoundation.org>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200819185654.151170-13-vaibhavgupta40@gmail.com
      a91df118
    • Vaibhav Gupta's avatar
      fbdev: s3fb: use generic power management · fb6e2db8
      Vaibhav Gupta authored
      Drivers should do only device-specific jobs. But in general, drivers using
      legacy PCI PM framework for .suspend()/.resume() have to manage many PCI
      PM-related tasks themselves which can be done by PCI Core itself. This
      brings extra load on the driver and it directly calls PCI helper functions
      to handle them.
      
      Switch to the new generic framework by updating function signatures and
      define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove
      unnecessary calls to the PCI Helper functions along with the legacy
      .suspend & .resume bindings.
      
      The s3_pci_suspend() is not designed to function in the case of Freeze.
      Thus, the code checked for "if (state.event == PM_EVENT_FREEZE....)". This
      is because, in the legacy framework, this callback was invoked even in the
      event of Freeze. Hence, added the load of unnecessary function-call.
      
      The goal can be achieved by binding the callback with only ".suspend" and
      ".poweroff" in the "s3_pci_pm_ops" const variable. This also avoids the
      step of checking "state.event == PM_EVENT_FREEZE" every time the callback
      is invoked.
      Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Cc: Bjorn Helgaas <helgaas@kernel.org>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Bjorn Helgaas <bjorn@helgaas.com>
      Cc: Vaibhav Gupta <vaibhav.varodek@gmail.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Andres Salomon <dilinger@queued.net>
      CC: Antonino Daplas <adaplas@gmail.com>
      Cc: Shuah Khan <skhan@linuxfoundation.org>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200819185654.151170-12-vaibhavgupta40@gmail.com
      fb6e2db8
    • Vaibhav Gupta's avatar
      fbdev: vt8623fb: use generic power management · 59d026b1
      Vaibhav Gupta authored
      Drivers should do only device-specific jobs. But in general, drivers using
      legacy PCI PM framework for .suspend()/.resume() have to manage many PCI
      PM-related tasks themselves which can be done by PCI Core itself. This
      brings extra load on the driver and it directly calls PCI helper functions
      to handle them.
      
      Switch to the new generic framework by updating function signatures and
      define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove
      unnecessary calls to the PCI Helper functions along with the legacy
      .suspend & .resume bindings.
      
      The vt8623_pci_suspend() is not designed to function in the case of Freeze.
      Thus, the code checked for "if (state.event == PM_EVENT_FREEZE....)". This
      is because, in the legacy framework, this callback was invoked even in the
      event of Freeze. Hence, added the load of unnecessary function-call.
      
      The goal can be achieved by binding the callback with only ".suspend" and
      ".poweroff" in the "vt8623_pci_pm_ops" const variable. This also avoids the
      step of checking "state.event == PM_EVENT_FREEZE" every time the callback
      is invoked.
      Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Cc: Bjorn Helgaas <helgaas@kernel.org>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Bjorn Helgaas <bjorn@helgaas.com>
      Cc: Vaibhav Gupta <vaibhav.varodek@gmail.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Andres Salomon <dilinger@queued.net>
      CC: Antonino Daplas <adaplas@gmail.com>
      Cc: Shuah Khan <skhan@linuxfoundation.org>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200819185654.151170-11-vaibhavgupta40@gmail.com
      59d026b1
    • Vaibhav Gupta's avatar
      fbdev: i740fb: use generic power management · 805a5c45
      Vaibhav Gupta authored
      Drivers should do only device-specific jobs. But in general, drivers using
      legacy PCI PM framework for .suspend()/.resume() have to manage many PCI
      PM-related tasks themselves which can be done by PCI Core itself. This
      brings extra load on the driver and it directly calls PCI helper functions
      to handle them.
      
      Switch to the new generic framework by updating function signatures and
      define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove
      unnecessary calls to the PCI Helper functions along with the legacy
      .suspend & .resume bindings.
      
      The i740fb_suspend() is not designed to function in the case of Freeze.
      Thus, the code checked for "if (state.event == PM_EVENT_FREEZE....)". This
      is because, in the legacy framework, this callback was invoked even in the
      event of Freeze. Hence, added the load of unnecessary function-call.
      
      The goal can be achieved by binding the callback with only ".suspend" and
      ".poweroff" in the "i740fb_pm_ops" const variable. This also avoids the
      step of checking "if (state.event == PM_EVENT_FREEZE....)" every time the
      callback is invoked.
      Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Cc: Bjorn Helgaas <helgaas@kernel.org>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Bjorn Helgaas <bjorn@helgaas.com>
      Cc: Vaibhav Gupta <vaibhav.varodek@gmail.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Andres Salomon <dilinger@queued.net>
      CC: Antonino Daplas <adaplas@gmail.com>
      Cc: Shuah Khan <skhan@linuxfoundation.org>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200819185654.151170-10-vaibhavgupta40@gmail.com
      805a5c45
    • Vaibhav Gupta's avatar
      fbdev: cyber2000fb: use generic power management · c62c0f57
      Vaibhav Gupta authored
      Switch to the new generic framework by updating function signatures and
      define a "struct dev_pm_ops" variable to bind PM callbacks. This way we can
      remove the legacy .suspend & .resume bindings from "lxfb_driver".
      Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Cc: Bjorn Helgaas <helgaas@kernel.org>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Bjorn Helgaas <bjorn@helgaas.com>
      Cc: Vaibhav Gupta <vaibhav.varodek@gmail.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Andres Salomon <dilinger@queued.net>
      CC: Antonino Daplas <adaplas@gmail.com>
      Cc: Shuah Khan <skhan@linuxfoundation.org>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200819185654.151170-9-vaibhavgupta40@gmail.com
      c62c0f57
    • Vaibhav Gupta's avatar
      fbdev: savagefb: use generic power management · a4ba7df5
      Vaibhav Gupta authored
      Drivers should do only device-specific jobs. But in general, drivers using
      legacy PCI PM framework for .suspend()/.resume() have to manage many PCI
      PM-related tasks themselves which can be done by PCI Core itself. This
      brings extra load on the driver and it directly calls PCI helper functions
      to handle them.
      
      Switch to the new generic framework by updating function signatures and
      define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove
      unnecessary calls to the PCI Helper functions along with the legacy
      .suspend & .resume bindings.
      
      Now,
      - savagefb_suspend() had a "pm_message_t" type parameter as per legacy
        PCI PM framework that got deprecated in generic.
      - Rename the callback as savagefb_suspend_late() and preserve the
        parameter.
      - Define 3 new callbacks as:
              * savagefb_suspend()
              * savagefb_freeze()
              * savagefb_hibernate()
        which in turn call savagefb_suspend_late() by passing appropriate value
        for "pm_message_t" type parameter.
      - Bind the callbacks in "struct dev_pm_ops" type variable
        "savagefb_pm_ops".
      Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Cc: Bjorn Helgaas <helgaas@kernel.org>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Bjorn Helgaas <bjorn@helgaas.com>
      Cc: Vaibhav Gupta <vaibhav.varodek@gmail.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Andres Salomon <dilinger@queued.net>
      CC: Antonino Daplas <adaplas@gmail.com>
      Cc: Shuah Khan <skhan@linuxfoundation.org>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200819185654.151170-8-vaibhavgupta40@gmail.com
      a4ba7df5
    • Vaibhav Gupta's avatar
      fbdev: nvidia: use generic power management · 6d111187
      Vaibhav Gupta authored
      Drivers should do only device-specific jobs. But in general, drivers using
      legacy PCI PM framework for .suspend()/.resume() have to manage many PCI
      PM-related tasks themselves which can be done by PCI Core itself. This
      brings extra load on the driver and it directly calls PCI helper functions
      to handle them.
      
      Switch to the new generic framework by updating function signatures and
      define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove
      unnecessary calls to the PCI Helper functions along with the legacy
      .suspend & .resume bindings.
      
      Now,
      - nvidiafb_suspend() had a "pm_message_t" type parameter as per legacy
        PCI PM framework that got deprecated in generic.
      - Rename the callback as nvidiafb_suspend_late() and preserve the
        parameter.
      - Define 3 new callbacks as:
              * nvidiafb_suspend()
              * nvidiafb_freeze()
              * nvidiafb_hibernate()
        which in turn call nvidiafb_suspend_late() by passing appropriate value
        for "pm_message_t" type parameter.
      - Bind the callbacks in "struct dev_pm_ops" type variable
        "nvidiafb_pm_ops".
      Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Cc: Bjorn Helgaas <helgaas@kernel.org>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Bjorn Helgaas <bjorn@helgaas.com>
      Cc: Vaibhav Gupta <vaibhav.varodek@gmail.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Andres Salomon <dilinger@queued.net>
      CC: Antonino Daplas <adaplas@gmail.com>
      Cc: Shuah Khan <skhan@linuxfoundation.org>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200819185654.151170-7-vaibhavgupta40@gmail.com
      6d111187
    • Vaibhav Gupta's avatar
      fbdev: aty128fb: use generic power management · c1a47776
      Vaibhav Gupta authored
      Drivers should do only device-specific jobs. But in general, drivers using
      legacy PCI PM framework for .suspend()/.resume() have to manage many PCI
      PM-related tasks themselves which can be done by PCI Core itself. This
      brings extra load on the driver and it directly calls PCI helper functions
      to handle them.
      
      Switch to the new generic framework by updating function signatures and
      define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove
      unnecessary calls to the PCI Helper functions along with the legacy
      .suspend & .resume bindings.
      
      Now,
      - aty128_pci_suspend() had a "pm_message_t" type parameter as per legacy
        PCI PM framework that got deprecated in generic.
      - Rename the callback as aty128_pci_suspend_late() and preserve the
        parameter.
      - Define 3 new callbacks as:
              * aty128_pci_suspend()
              * aty128_pci_freeze()
              * aty128_pci_hibernate()
        which in turn call aty128_pci_suspend_late() by passing appropriate
        value for "pm_message_t" type parameter.
      - Bind the callbacks in "struct dev_pm_ops" type variable
        "aty128_pci_pm_ops".
      Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Cc: Bjorn Helgaas <helgaas@kernel.org>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Bjorn Helgaas <bjorn@helgaas.com>
      Cc: Vaibhav Gupta <vaibhav.varodek@gmail.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Andres Salomon <dilinger@queued.net>
      CC: Antonino Daplas <adaplas@gmail.com>
      Cc: Shuah Khan <skhan@linuxfoundation.org>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200819185654.151170-6-vaibhavgupta40@gmail.com
      c1a47776
    • Vaibhav Gupta's avatar
      fbdev: aty: use generic power management · 348b2956
      Vaibhav Gupta authored
      Drivers should do only device-specific jobs. But in general, drivers using
      legacy PCI PM framework for .suspend()/.resume() have to manage many PCI
      PM-related tasks themselves which can be done by PCI Core itself. This
      brings extra load on the driver and it directly calls PCI helper functions
      to handle them.
      
      Switch to the new generic framework by updating function signatures and
      define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove
      unnecessary calls to the PCI Helper functions along with the legacy
      .suspend & .resume bindings.
      
      Now,
      - atyfb_pci_suspend() had a "pm_message_t" type parameter as per legacy
        PCI PM framework, that got deprecated in generic.
      - Rename the callback as atyfb_pci_suspend_late() and preserve the
        parameter.
      - Define 3 new callbacks as:
              * atyfb_pci_suspend()
              * atyfb_pci_freeze()
              * atyfb_pci_hibernate()
        which in turn call atyfb_pci_suspend_late() by passing appropriate
        value for "pm_message_t" type parameter.
      - Bind the callbacks in "struct dev_pm_ops" type variable
        "atyfb_pci_pm_ops".
      Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Cc: Bjorn Helgaas <helgaas@kernel.org>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Bjorn Helgaas <bjorn@helgaas.com>
      Cc: Vaibhav Gupta <vaibhav.varodek@gmail.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Andres Salomon <dilinger@queued.net>
      CC: Antonino Daplas <adaplas@gmail.com>
      Cc: Shuah Khan <skhan@linuxfoundation.org>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200819185654.151170-5-vaibhavgupta40@gmail.com
      348b2956
    • Vaibhav Gupta's avatar
      fbdev: via-core: use generic power management · ab5fe88a
      Vaibhav Gupta authored
      Drivers should do only device-specific jobs. But in general, drivers using
      legacy PCI PM framework for .suspend()/.resume() have to manage many PCI
      PM-related tasks themselves which can be done by PCI Core itself. This
      brings extra load on the driver and it directly calls PCI helper functions
      to handle them.
      
      Switch to the new generic framework by updating function signatures and
      define a "struct dev_pm_ops" variable to bind PM callbacks.
      
      The via_suspend() is designed to function only in the case of Suspend.
      Thus, the code checked for "if (state.event != PM_EVENT_SUSPEND)". This is
      because, in the legacy framework, this callback was invoked even in the
      event of Freeze and Hibernate. Hence, added the load of unnecessary
      function-calls.
      
      The goal can be achieved by binding the callback with only
      "via_pm_ops.suspend" in the new framework. This also avoids the step of
      checking "if (state.event != PM_EVENT_SUSPEND)" every time the callback is
      invoked.
      Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Cc: Bjorn Helgaas <helgaas@kernel.org>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Bjorn Helgaas <bjorn@helgaas.com>
      Cc: Vaibhav Gupta <vaibhav.varodek@gmail.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Andres Salomon <dilinger@queued.net>
      CC: Antonino Daplas <adaplas@gmail.com>
      Cc: Shuah Khan <skhan@linuxfoundation.org>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200819185654.151170-4-vaibhavgupta40@gmail.com
      ab5fe88a
    • Vaibhav Gupta's avatar
      fbdev: lxfb: use generic power management · df7a9ec3
      Vaibhav Gupta authored
      Switch to the new generic framework by updating function signatures and
      define a "struct dev_pm_ops" variable to bind PM callbacks. This way we can
      remove the legacy .suspend & .resume bindings from "lxfb_driver".
      
      The lxfb_suspend() is designed to function only in the case of Suspend.
      Thus, the code was kept inside "if (state.event == PM_EVENT_SUSPEND)"
      container. This is because, in the legacy framework, this callback was
      invoked even in the event of Freeze and Hibernate. Hence, added the load of
      unnecessary function-calls.
      
      The goal can be achieved by binding the callback with only
      "lxfb_pm_ops.suspend" in the new framework. This also avoids the step of
      checking "if (state.event == PM_EVENT_SUSPEND)" every time the callback is
      invoked.
      Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Cc: Bjorn Helgaas <helgaas@kernel.org>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Bjorn Helgaas <bjorn@helgaas.com>
      Cc: Vaibhav Gupta <vaibhav.varodek@gmail.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Andres Salomon <dilinger@queued.net>
      CC: Antonino Daplas <adaplas@gmail.com>
      Cc: Shuah Khan <skhan@linuxfoundation.org>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200819185654.151170-3-vaibhavgupta40@gmail.com
      df7a9ec3
    • Vaibhav Gupta's avatar
      fbdev: gxfb: use generic power management · fa41f287
      Vaibhav Gupta authored
      Switch to the new generic framework by updating function signatures and
      define a "struct dev_pm_ops" variable to bind PM callbacks. This way we can
      remove the legacy .suspend & .resume bindings from "gxfb_driver".
      
      The gxfb_suspend() is designed to function only in the case of Suspend.
      Thus, the code was kept inside "if (state.event == PM_EVENT_SUSPEND)"
      container. This is because, in the legacy framework, this callback was
      invoked even in the event of Freeze and Hibernate. Hence, added the load of
      unnecessary function-calls.
      
      The goal can be achieved by binding the callback with only
      "gxfb_pm_ops.suspend" in the new framework. This also avoids the step of
      checking "if (state.event == PM_EVENT_SUSPEND)" every time the callback is
      invoked.
      Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Cc: Bjorn Helgaas <helgaas@kernel.org>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Bjorn Helgaas <bjorn@helgaas.com>
      Cc: Vaibhav Gupta <vaibhav.varodek@gmail.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Andres Salomon <dilinger@queued.net>
      CC: Antonino Daplas <adaplas@gmail.com>
      Cc: Shuah Khan <skhan@linuxfoundation.org>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200819185654.151170-2-vaibhavgupta40@gmail.com
      fa41f287
    • Tom Rix's avatar
      video: fbdev: sis: fix null ptr dereference · ad6f93e9
      Tom Rix authored
      Clang static analysis reports this representative error
      
      init.c:2501:18: warning: Array access (from variable 'queuedata') results
        in a null pointer dereference
            templ |= ((queuedata[i] & 0xc0) << 3);
      
      This is the problem block of code
      
         if(ModeNo > 0x13) {
            ...
            if(SiS_Pr->ChipType == SIS_730) {
      	 queuedata = &FQBQData730[0];
            } else {
      	 queuedata = &FQBQData[0];
            }
         } else {
      
         }
      
      queuedata is not set in the else block
      
      Reviewing the old code, the arrays FQBQData730 and FQBQData were
      used directly.
      
      So hoist the setting of queuedata out of the if-else block.
      
      Fixes: 544393fe ("[PATCH] sisfb update")
      Signed-off-by: default avatarTom Rix <trix@redhat.com>
      Cc: Thomas Winischhofer <thomas@winischhofer.net>
      Cc: Andrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200805145208.17727-1-trix@redhat.com
      ad6f93e9
    • Colin Ian King's avatar
    • Rodrigo Alencar's avatar
      video: fbdev: ssd1307fb: Added support to Column offset · 9ec2832e
      Rodrigo Alencar authored
      This patch provides support for displays like VGM128064B0W10,
      which requires a column offset of 2, i.e., its segments starts
      in SEG2 and ends in SEG129.
      Signed-off-by: default avatarRodrigo Alencar <455.rodrigo.alencar@gmail.com>
      Acked-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/1595622138-3965-1-git-send-email-455.rodrigo.alencar@gmail.com
      9ec2832e
    • Colin Ian King's avatar
      video: fbdev: vga16fb: fix setting of pixclock because a pass-by-value error · c72fab81
      Colin Ian King authored
      The pixclock is being set locally because it is being passed as a
      pass-by-value argument rather than pass-by-reference, so the computed
      pixclock is never being set in var->pixclock. Fix this by passing
      by reference.
      
      [This dates back to 2002, I found the offending commit from the git
      history git://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git ]
      
      Addresses-Coverity: ("Unused value")
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Jani Nikula <jani.nikula@intel.com>
      [b.zolnierkie: minor patch summary fixup]
      [b.zolnierkie: removed "Fixes:" tag (not in upstream tree)]
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200723170227.996229-1-colin.king@canonical.com
      c72fab81
    • Evgeny Novikov's avatar
      fbdev: sm712fb: handle ioremap() errors in probe · bcee1609
      Evgeny Novikov authored
      smtcfb_pci_probe() does not handle ioremap() errors for case 0x720. The
      patch fixes that exactly like for case 0x710/2.
      
      Found by Linux Driver Verification project (linuxtesting.org).
      Signed-off-by: default avatarEvgeny Novikov <novikov@ispras.ru>
      Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
      Cc: Teddy Wang <teddy.wang@siliconmotion.com>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200713080532.15504-1-novikov@ispras.ru
      bcee1609
    • George Kennedy's avatar
      fbmem: add margin check to fb_check_caps() · a49145ac
      George Kennedy authored
      A fb_ioctl() FBIOPUT_VSCREENINFO call with invalid xres setting
      or yres setting in struct fb_var_screeninfo will result in a
      KASAN: vmalloc-out-of-bounds failure in bitfill_aligned() as
      the margins are being cleared. The margins are cleared in
      chunks and if the xres setting or yres setting is a value of
      zero upto the chunk size, the failure will occur.
      
      Add a margin check to validate xres and yres settings.
      Signed-off-by: default avatarGeorge Kennedy <george.kennedy@oracle.com>
      Reported-by: syzbot+e5fd3e65515b48c02a30@syzkaller.appspotmail.com
      Reviewed-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Cc: Dhaval Giani <dhaval.giani@oracle.com>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/1594149963-13801-1-git-send-email-george.kennedy@oracle.com
      a49145ac
    • Christian König's avatar
      drm/ttm: merge offset and base in ttm_bus_placement · 54d04ea8
      Christian König authored
      This is used by TTM to communicate the physical address
      which should be used with ioremap(), ioremap_wc(). We don't
      need to separate the base and offset in any way here.
      Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
      Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/389457/
      54d04ea8
    • Christian König's avatar
      drm/qxl: don't touch mem.bus.offset · 1ff67ce4
      Christian König authored
      This is internal to TTM and should not be used by drivers directly.
      
      Drop the call to qxl_ttm_io_mem_reserve() and use mem->start instead.
      Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
      Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/389456/
      1ff67ce4
    • Neil Armstrong's avatar
      drm/bridge: dw-mipi-dsi: fix dw_mipi_dsi_debugfs_show/write warnings · 25c4bcf9
      Neil Armstrong authored
      This fixes the following warnings while building in W=1 :
      dw-mipi-dsi.c:1002:5: warning: no previous prototype for 'dw_mipi_dsi_debugfs_write' [-Wmissing-prototypes]
      dw-mipi-dsi.c:1027:5: warning: no previous prototype for 'dw_mipi_dsi_debugfs_show' [-Wmissing-prototypes]
      
      Fixes: e2435d69 ("drm/bridge: dw-mipi-dsi.c: Add VPG runtime config through debugfs")
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Signed-off-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Angelo Ribeiro <angelo.ribeiro@synopsys.com>
      Cc: Maxime Ripard <maxime@cerno.tech>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Thomas Zimmermann <tzimmermann@suse.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200907102711.23748-1-narmstrong@baylibre.com
      25c4bcf9
  2. 07 Sep, 2020 19 commits