1. 15 Aug, 2012 4 commits
    • Archit Taneja's avatar
      OMAPDSS: SDI: Maintain our own timings field in driver data · 9b4a5716
      Archit Taneja authored
      The SDI driver currently relies on the timings in omap_dss_device struct to
      configure the DISPC accordingly. This makes the SDI interface driver dependent
      on the omap_dss_device struct.
      
      Make the SDI driver data maintain it's own timings field. The panel driver is
      expected to call omapdss_sdi_set_timings() to set these timings before the panel
      is enabled.
      
      Make the SDI panel driver configure the new timings is the omap_dss_device
      struct(dssdev->panel.timings). The SDI driver is responsible for maintaining
      only it's own copy of timings.
      Signed-off-by: default avatarArchit Taneja <archit@ti.com>
      9b4a5716
    • Archit Taneja's avatar
      OMAPDSS: SDI: Create a function to set timings · c7833f7b
      Archit Taneja authored
      Create function omapdss_sdi_set_timings(). Configuring new timings is done the
      same way as before, SDI is disabled, and re-enabled with the new timings in
      dssdev. This just moves the code from the panel drivers to the SDI driver.
      
      The panel drivers shouldn't be aware of how SDI manages to configure a new set
      of timings. This should be taken care of by the SDI driver itself.
      Signed-off-by: default avatarArchit Taneja <archit@ti.com>
      c7833f7b
    • Archit Taneja's avatar
      OMAPDSS: HDMI: Add locking for hdmi interface set timing functions · ed1aa900
      Archit Taneja authored
      The hdmi interface driver exposes functions to the hdmi panel driver to
      configure the interface timings maintained by the hdmi driver.
      
      These timings(stored in hdmi.ip_data.cfg) should be protected by the hdmi lock
      to ensure they are called sequentially, this is similar to how hdmi enable and
      disable functions need locking.
      Signed-off-by: default avatarArchit Taneja <archit@ti.com>
      ed1aa900
    • Archit Taneja's avatar
      OMAPDSS: HDMI: Use our own omap_video_timings field when setting interface timings · 7849398f
      Archit Taneja authored
      The hdmi driver currently updates only the 'code' member of hdmi_config when
      the op omapdss_hdmi_display_set_timing() is called by the hdmi panel driver.
      The 'timing' field of hdmi_config is updated only when hdmi_power_on is called.
      It makes more sense to configure the whole hdmi_config field in the set_timing
      op called by the panel driver. This way, we don't need to call both functions
      to ensure that our hdmi_config is configured correctly. Also, we don't need to
      calculate hdmi_config during hdmi_power_on, or rely on the omap_video_timings
      in the panel's omap_dss_device struct.
      
      The default timings of the hdmi panel are represented in a cleaner form. Since
      the hdmi output is now configured by it's own copy of timings (in
      hdmi.ip_data.cfg), the panel driver needs to set it to a valid value before
      enabling hdmi output. We now call omapdss_hdmi_set_timing() before enabling
      hdmi output, this is done to atleast have the hdmi output configured to the
      panel's default timings if the DSS user didn't call panel driver's set_timings()
      op explicitly.
      Signed-off-by: default avatarArchit Taneja <archit@ti.com>
      7849398f
  2. 13 Aug, 2012 8 commits
    • Archit Taneja's avatar
      OMAPDSS: DSI: Update manager timings on a manual update · 55cd63ac
      Archit Taneja authored
      During a command mode update using DISPC video port, we may need to swap the
      connected overlay manager's width and height when 90 or 270 degree rotation is
      done via the panel by changing it's address mode.
      
      Call dss_mgr_set_timings() in update_screen_dispc() before starting the manager
      update. The new manager size is updated in the 'timings' field of DSI driver's
      private data via omapdss_dsi_set_size(). A panel driver is expected to call this
      when performing rotation.
      Signed-off-by: default avatarArchit Taneja <archit@ti.com>
      55cd63ac
    • Archit Taneja's avatar
      OMAPDSS: DSI: Add function to set panel size for command mode panels · e352574d
      Archit Taneja authored
      DSI command mode panels don't need to configure a full set of timings to
      configure DSI, they only require the width and the height of the panel in
      pixels.
      
      Use omapdss_dsi_set_size for command mode panels, omapdss_dsi_set_timings is
      meant for video mode panels. When performing rotation via chaning the address
      mode of the panel, we would need to swap width and height when doing 90 or 270
      rotation. Make sure that omapdss_dsi_set_size() makes the new width and height
      visible to DSI.
      Signed-off-by: default avatarArchit Taneja <archit@ti.com>
      e352574d
    • Archit Taneja's avatar
      OMAPDSS: DSI: Maintain own copy of timings in driver data · e67458a8
      Archit Taneja authored
      The DSI driver currently relies on the timings in omap_dss_device struct to
      configure the DISPC and DSI blocks accordingly. This makes the DSI interface
      driver dependent on the omap_dss_device struct.
      
      Make the DSI driver data maintain it's own timings field. A DSI video mode panel
      driver is expected to call omapdss_dsi_set_timings() to set these timings before
      the panel is enabled.
      Signed-off-by: default avatarArchit Taneja <archit@ti.com>
      e67458a8
    • Archit Taneja's avatar
      OMAPDSS: DPI displays: Take care of panel timings in the driver itself · bdcae3cc
      Archit Taneja authored
      The timings maintained in omap_dss_device(dssdev->panel.timings) should be
      maintained by the panel driver itself. It's the panel drivers responsibility
      to update it if a new set of timings is to be configured. The DPI interface
      driver shouldn't be responsible of updating the panel timings, it's responsible
      of maintianing it's own copy of timings.
      Signed-off-by: default avatarArchit Taneja <archit@ti.com>
      bdcae3cc
    • Archit Taneja's avatar
      OMAPDSS: DPI: Maintain our own timings field in driver data · c499144c
      Archit Taneja authored
      The DPI driver currently relies on the timings in omap_dss_device struct to
      configure the DISPC accordingly. This makes the DPI interface driver dependent
      on the omap_dss_device struct.
      
      Make the DPI driver data maintain it's own timings field. The panel driver is
      expected to call dpi_set_timings()(renamed to omapdss_dpi_set_timings) to set
      these timings before the panel is enabled.
      
      In the set_timings() op, we still ensure that the omap_dss_device timings
      (dssdev->panel.timings) are configured. This will later be configured only by
      the DPI panel drivers.
      Signed-off-by: default avatarArchit Taneja <archit@ti.com>
      c499144c
    • Archit Taneja's avatar
      OMAPDSS: Displays: Add locking in generic DPI panel driver · e19d659b
      Archit Taneja authored
      The generic DPI panel driver doesn't currently have locking to ensure that
      the display states and the driver data is maintained correctly. Add mutex
      locking to take care of this. Add a new get_timings driver op to override the
      default get_timings op. The new driver op contains locking to ensure the correct
      panel timings are seen when a DSS2 user calls device->driver->get_timings.
      Signed-off-by: default avatarArchit Taneja <archit@ti.com>
      e19d659b
    • Archit Taneja's avatar
      OMAPDSS: DPI: Add locking for DPI interface · c8a5e4e8
      Archit Taneja authored
      The DPI interface driver currently relies on the panel driver to ensure calls
      like omapdss_dpi_display_enable() and omapdss_dpi_display_disable() are executed
      sequentially. Also, currently, there is no way to protect the DPI driver data.
      
      All DPI panel drivers don't ensure this, and in general, a DPI panel driver
      should use it's lock to that ensure it's own driver data and omap_dss_device
      states are taken care of, and not worry about the DPI interface.
      
      Add mutex locking in the DPI enable/disable/set_timings ops.
      Signed-off-by: default avatarArchit Taneja <archit@ti.com>
      c8a5e4e8
    • Archit Taneja's avatar
      OMAPDSS: APPLY: Constify timings argument in dss_mgr_set_timings · 27dfddc7
      Archit Taneja authored
      The function dss_mgr_set_timings is supposed to apply timings passed by an
      interface driver. It is not supposed to change the timings. Add const qualifier
      to the omap_video_timings pointer argument in dss_mgr_set_timings().
      Signed-off-by: default avatarArchit Taneja <archit@ti.com>
      27dfddc7
  3. 10 Aug, 2012 4 commits
  4. 29 Jun, 2012 24 commits
    • Tomi Valkeinen's avatar
      Merge "Apply LCD manager related parameters" from Archit · 974a6582
      Tomi Valkeinen authored
      The LCD interface drivers(DPI, DSI, RFBI, SDI) do some direct DISPC register
      writes to configure LCD manager related fields. This series groups these fields
      into a single struct, and let's the interface driver apply these parameters.
      
      This allows us to:
      
      - Check the LCD manager related parameters before applying them.
      - Remove some omap_dss_device references as APPLY holds the applied parameters.
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      974a6582
    • Archit Taneja's avatar
      OMAPDSS: OVERLAY: Clean up replication checking · 6c6f510a
      Archit Taneja authored
      Replication logic for an overlay depends on the color mode in which it is
      configured and the video port width of the manager it is connected to.
      
      video port width now held in dss_lcd_mgr_config in the manager's private
      data in APPLY. Use this instead of referring to the omap_dss_device connected to
      the manager.
      
      Replication is enabled in the case of TV manager, the video_port_width is set to
      a default value of 24 for TV manager.
      
      Make the replication checking an overlay function since it's more of an overlay
      characteristic than a display characteristic.
      Signed-off-by: default avatarArchit Taneja <archit@ti.com>
      6c6f510a
    • Archit Taneja's avatar
      OMAPDSS: RFBI: Use dss_mgr_enable to enable the overlay manager · c47cdb30
      Archit Taneja authored
      The RFBI driver uses a direct DISPC register write to enable the overlay
      manager. Replace this with dss_mgr_enable() which checks if the connected
      overlay and managers are correctly configured, and configure DSS for
      fifomerge.
      Signed-off-by: default avatarArchit Taneja <archit@ti.com>
      c47cdb30
    • Archit Taneja's avatar
      OMAPDSS: DISPC: Remove a redundant function · dd88b7a6
      Archit Taneja authored
      dss_mgr_is_lcd() available in dss.h does the same thing as dispc_mgr_is_lcd()
      in dispc.c. Remove the function from dispc.c and replace it with the one in
      dss.h.
      Signed-off-by: default avatarArchit Taneja <archit@ti.com>
      dd88b7a6
    • Archit Taneja's avatar
      OMAPDSS: APPLY: Remove usage of omap_dss_device from manual/auto update checks · 75bac5d1
      Archit Taneja authored
      APPLY needs to know at certain places whether an overlay manager is in manual
      or auto update mode. The caps of the connected omap_dss_device were used to
      check that.
      
      A LCD manager is in manual update if stallmode is enabled for that manager. TV
      managers for now always auto update.
      
      Return the value of stallmode parameter in the private data 'lcd_confg' in
      mgr_manual_update() and ovl_manual_update(), for TV managers stallmode field
      will be false by default.
      Signed-off-by: default avatarArchit Taneja <archit@ti.com>
      75bac5d1
    • Archit Taneja's avatar
      OMAPDSS: MANAGER: Check LCD related overlay manager parameters · 6e543595
      Archit Taneja authored
      The LCD related manager configurations are a part of the manager's private data
      in APPLY. Pass this to dss_lcd_mgr_config to dss_mgr_check and create a function
      to check the validity of some of the configurations.
      
      To check some of the configurations, we require information of interface to
      which the manager output is connected. These can be added once interfaces are
      represented as an entity.
      Signed-off-by: default avatarArchit Taneja <archit@ti.com>
      6e543595
    • Archit Taneja's avatar
      OMAPDSS: APPLY: Remove DISPC writes to manager's lcd parameters in interface drivers · f476ae9d
      Archit Taneja authored
      Replace the DISPC fuctions used to configure LCD channel related manager
      parameters with dss_mgr_set_lcd_config() in APPLY. This function ensures that
      the DISPC registers are written at the right time by using the shadow register
      programming model.
      
      The LCD manager configurations is stored as a private data of manager in APPLY.
      It is treated as an extra info as it's the panel drivers which trigger this
      apply via interface drivers, and not a DSS2 user like omapfb or omapdrm.
      
      Storing LCD manager related properties in APPLY also prevents the need to refer
      to the panel connected to the manager for information. This helps in making the
      DSS driver less dependent on panel.
      
      A helper function is added to check whether the manager is LCD or TV. The direct
      DISPC register writes are removed from the interface drivers.
      Signed-off-by: default avatarArchit Taneja <archit@ti.com>
      f476ae9d
    • Archit Taneja's avatar
      OMAPDSS: SDI: Configure dss_lcd_mgr_config struct with lcd manager parameters · 37a57990
      Archit Taneja authored
      Create a dss_lcd_mgr_config struct instance in SDI. Fill up all the parameters
      of the struct with configurations held by the panel, and the configurations
      required by SDI.
      
      Use these to write to the DISPC registers. These direct register writes would be
      later replaced by a function which applies the configuration using the shadow
      register programming model.
      
      Create function sdi_config_lcd_manager() which fills the mgr_config parameters
      and writes to the DISPC registers.
      Signed-off-by: default avatarArchit Taneja <archit@ti.com>
      37a57990
    • Archit Taneja's avatar
      OMAPDSS: DSI: Configure dss_lcd_mgr_config struct with lcd manager parameters · 7d2572f8
      Archit Taneja authored
      Create a dss_lcd_mgr_config struct instance in DSI. Fill up all the parameters
      of the struct with configurations held by the panel, and the configurations
      required by DSI.
      
      Use these to write to the DISPC registers. These direct register writes would be
      later replaced by a function which applies the configuration using the shadow
      register programming model.
      
      The function dsi_configure_dispc_clocks() is now called in
      dsi_display_init_dispc(), this lets all the lcd manager related configurations
      happen in the same place. The DISPC_DIVISORo register was written in
      dsi_configure_dispc_clock(), now it just fills up the dispc_clock_info parameter
      in mgr_config. The clock_info is written later in dsi_display_init_dispc().
      Signed-off-by: default avatarArchit Taneja <archit@ti.com>
      7d2572f8
    • Archit Taneja's avatar
      OMAPDSS: RFBI: Configure dss_lcd_mgr_config struct with lcd manager parameters · bc2e60a6
      Archit Taneja authored
      Create a dss_lcd_mgr_config struct instance in RFBI. Fill up all the parameters
      of the struct with configurations held by the panel, and the configurations
      required by RFBI.
      
      Use these to write to the DISPC registers. These direct register writes would be
      later replaced by a function which applies the configuration using the shadow
      register programming model.
      
      Create function rfbi_config_lcd_manager() which fills up the mgr_config
      parameters and writes to the DISPC regs.
      Signed-off-by: default avatarArchit Taneja <archit@ti.com>
      bc2e60a6
    • Archit Taneja's avatar
      OMAPDSS: DPI: Configure dss_lcd_mgr_config struct with lcd manager parameters · 5cf9a264
      Archit Taneja authored
      Create a dss_lcd_mgr_config struct instance in DPI. Fill up all the parameters
      of the struct with configurations held by the panel, and the configurations
      required by DPI.
      
      Use these to write to the DISPC registers. These direct register writes would be
      later replaced by a function which applies the configuration using the shadow
      register programming model.
      
      The DISPC_DIVISORo registers were written in the functions dpi_set_dispc_clk()
      and dpi_set_dsi_clk(), now they just fill up the dispc_clock_info parameter in
      mgr_config. They are written later in dpi_config_lcd_manager.
      Signed-off-by: default avatarArchit Taneja <archit@ti.com>
      5cf9a264
    • Archit Taneja's avatar
      OMAPDSS: Add struct to hold LCD overlay manager configuration · c56fb3ef
      Archit Taneja authored
      Create a struct dss_lcd_mgr_config which holds LCD overlay manager related
      parameters. These are currently partially contained in the omap_dss_device
      connected to the manager, and the rest are in the interface driver.
      
      The parameters are directly written to the DISPC registers in the interface
      drivers. These should eventually be applied at the correct time using the
      shadow register programming model. This struct would help in grouping these
      parameters so that they can be applied together.
      Signed-off-by: default avatarArchit Taneja <archit@ti.com>
      c56fb3ef
    • Archit Taneja's avatar
      OMAPDSS: DISPC: Change return type of dispc_mgr_set_clock_div() · f0d08f89
      Archit Taneja authored
      dipsc_mgr_set_clock div has an int return type to report errors or success.
      The function doesn't really check for errors and always returns 0. Change
      the return type to void.
      
      Checking for the correct DISPC clock divider ranges will be done when a DSS2
      user does a manager apply. This support will be added later.
      Signed-off-by: default avatarArchit Taneja <archit@ti.com>
      f0d08f89
    • Chandrabhanu Mahapatra's avatar
      ARM: OMAP2PLUS: DSS: Disable LCD3 output when resetting DSS · 465698ee
      Chandrabhanu Mahapatra authored
      The dispc_disable_outputs() function currently disables all LCD managers except
      LCD3. This patch adds disabling functionality for LCD3 manager thereby
      maintaining consistency of Display Subsystem for in case Display Controller is
      reset when LCD3 manager is in use.
      Signed-off-by: default avatarChandrabhanu Mahapatra <cmahapatra@ti.com>
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      465698ee
    • Tomi Valkeinen's avatar
      Merge Misc DSS clean ups from Archit · e5310ed7
      Tomi Valkeinen authored
      This series does the following things:
      
      - Remove passive matrix LCD support: There are no panel drivers with
        passive matrix LCD drivers in DSS2. There are no passive matrix panels
        even available to test with DSS. Since no one is using passive matrix
        panels, stop trying to support it. It cleans up the DSS driver.
      
      - Add some new fields to omap_video_timings: There were some standard
        panel timing fields missing from omap_video_timings. Namely
        Hsync/Vsync/DE levels and interlace. Add these to omap_video_timings
        to align it more with xorg modeline. Add some other OMAP DSS specific
        fields to omap_video_timings.
      
      - Remove some hacks done because omap_video_timings didn't have the
        above fields.
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      e5310ed7
    • Archit Taneja's avatar
      OMAPDSS: DSI: Fix HSYNC, VSYNC and DE polarities between DISPC and DSI · bd5a7b11
      Archit Taneja authored
      For DSI operation in videomode, DISPC logic levels for the signals HSYNC, VSYNC
      and DE need to be specified to DSI via the fields VP_HSYNC_POL, VP_VSYNC_POL and
      VP_DE_POL in DSI_CTRL registers.
      
      This information is completely internal to DSS as logic levels for the above
      signals hold no meaning on the DSI bus. Hence a DSI panel driver should be
      totally oblivious of these fields.
      
      Fix the logic levels/polarities in the DISPC and DSI registers to a default
      value. This is done by overriding these fields in omap_video_timings struct
      filled by the panel driver for DISPC, and use the equivalent default values
      when programming DSI_CTRL registers. Also, remove the redundant polarity related
      fields in omap_dss_dsi_videomode_data.
      Signed-off-by: default avatarArchit Taneja <archit@ti.com>
      bd5a7b11
    • Archit Taneja's avatar
      OMAPDSS: HDMI: Remove custom hdmi_video_timings struct · cc937e5e
      Archit Taneja authored
      The hdmi CEA and VESA timings were represented by the struct hdmi_video_timings,
      omap_video_timings couldn't be used as it didn't contain the fields hsync/vsync
      polarities and interlaced/progressive information.
      
      Remove hdmi_video_timings, and use omap_video_timings instead.
      
      Cc: Mythri P K <mythripk@ti.com>
      Signed-off-by: default avatarArchit Taneja <archit@ti.com>
      cc937e5e
    • Archit Taneja's avatar
      OMAPFB: Map interlace field in omap_video_timings with fb vmode flags · 23bae3ad
      Archit Taneja authored
      Use the interlace field in omap_video_timings to configure/retrieve
      corresponding fb mode flags in fb_var_screeninfo and fb_videomode.
      
      The interlace field maps with the fb mode flags FB_VMODE_INTERLACED and
      FB_VMODE_NONINTERLACED.
      Signed-off-by: default avatarArchit Taneja <archit@ti.com>
      23bae3ad
    • Archit Taneja's avatar
      OMAPDSS: DISPC/APPLY: Use interlace info in manager timings for dispc_ovl_setup() · 8050cbe4
      Archit Taneja authored
      Currently the interlace parameter passed to dispc_ovl_setup() is configured by
      checking the display type, and set to true if the display type is VENC.
      
      This isn't correct as other panels can take interlaced content too. The
      omap_video_timings struct in manager's private data contains the info whether
      the panel is in interlaced mode or not.
      Signed-off-by: default avatarArchit Taneja <archit@ti.com>
      8050cbe4
    • Archit Taneja's avatar
      OMAPDSS: Add interlace parameter to omap_video_timings · 23c8f88e
      Archit Taneja authored
      Add a parameter called interlace which tells whether the timings are in
      interlaced or progressive mode. This aligns the omap_video_timings struct with
      the Xorg modeline configuration.
      
      It also removes the hack needed to write to divide the manager height by 2 if
      the connected interface is VENC.
      Signed-off-by: default avatarArchit Taneja <archit@ti.com>
      23c8f88e
    • Archit Taneja's avatar
      OMAPDSS: Remove omap_panel_config enum from omap_dss_device · 07fb51c6
      Archit Taneja authored
      omap_panel_config contains fields which are finally written to DISPC_POL_FREQo
      registers. These are now held by omap_video_timings and are set when the manager
      timings are applied.
      
      Remove the omap_panel_config enum, and remove all it's references from panel or
      interface drivers.
      Signed-off-by: default avatarArchit Taneja <archit@ti.com>
      07fb51c6
    • Archit Taneja's avatar
      OMAPFB: Map the newly added omap_video_timings fields with fb sync flags · 783babf3
      Archit Taneja authored
      Use the newly added fields in omap_video_timings(hsync, vsync and data_enable
      logic levels and data, hsync and vsync latching related info) to
      configure/retrieve corresponding sync flags in fb_var_screeninfo and
      fb_videomode.
      
      Out of the new fields, hsync_level and vsync_level can be mapped to the fb sync
      flags FB_SYNC_HOR_HIGH_ACT and FB_SYNC_VERT_HIGH_ACT.
      
      When converting fb mode to omap_video_timings, the fields which don't have an
      equivalent parameter in fb are kept as the original values if the panel driver
      has a get_timings op, else they are set to default values.
      Signed-off-by: default avatarArchit Taneja <archit@ti.com>
      783babf3
    • Archit Taneja's avatar
      OMAPDSS: DISPC: Remove dispc_mgr_set_pol_freq() · 0e065c79
      Archit Taneja authored
      dispc_mgr_set_pol_freq() configures the fields in the register DISPC_POL_FREQo.
      All these fields have been moved to omap_video_timings struct, and are now
      programmed in dispc_mgr_set_lcd_timings(). These will be configured when timings
      are applied via dss_mgr_set_timings().
      
      Remove dispc_mgr_set_pol_freq() and it's calls from the interface drivers.
      Signed-off-by: default avatarArchit Taneja <archit@ti.com>
      0e065c79
    • Archit Taneja's avatar
      OMAPDSS: DISPC: Configure newly added omap_video_timing fields · 655e2941
      Archit Taneja authored
      Hsync, Vsync, Data enable enable logic levels and latching info of Data lanes,
      Hsync and Vsync signals(with respect to pixel clock) are newly added parameters
      in omap_video_timings.
      
      Program these in dispc_mgr_set_lcd_timings. These will be configured when the
      manager's timings are set via dss_mgr_set_timings().
      Signed-off-by: default avatarArchit Taneja <archit@ti.com>
      655e2941